root/gs2-extensions/parallel-building/trunk/src/setup.bash @ 24623

Revision 24623, 1.6 KB (checked in by jmt12, 8 years ago)

Make sure the extension's bin/script is on the path

Line 
1# GEXTPARALLELBUILDING
2extdesc="parallel processor enabled collection building"
3
4full_setup=`pwd`/${BASH_SOURCE}
5fulldir=${full_setup%/*}
6fulldir=${fulldir%/.}
7
8if [ "x$GSDLHOME" = "x" ] ; then
9  if [ -e ../../setup.bash ] ; then
10    export gsopt_noexts=1 && pushd ../.. && source setup.bash && popd
11    export gsopt_noexts=
12  elif [ -e ../../gs3-setup.sh ] ; then
13    export gsopt_noexts=1 && pushd ../.. && source gs3-setup.sh && popd
14    export gsopt_noexts=
15  fi
16
17fi
18
19if [ "x$GEXTPARALLELBUILDING" = "x" ] ; then
20
21  export PARALLELBUILDINGOS=`uname -s | tr '[A-Z]' '[a-z]' | sed 's/\([0-9]\+\)\?_.*$//'`
22  export GEXTPARALLELBUILDING=$fulldir
23  export GEXTPARALLELBUILDING_INSTALLED=$GEXTPARALLELBUILDING/$GSDLOS
24
25  export PATH=$GEXTPARALLELBUILDING_INSTALLED/bin:$fulldir/bin/script:$PATH
26
27  if [ "x$CXXFLAGS" = "x" ] ; then
28    export CXXFLAGS="-I$GEXTPARALLELBUILDING_INSTALLED/include"
29  else
30    export CXXFLAGS="-I$GEXTPARALLELBUILDING_INSTALLED/include $CXXFLAGS"
31  fi
32
33  if [ "x$LD_LIBRARY_PATH" = "x" ] ; then
34    export LD_LIBRARY_PATH=$GEXTPARALLELBUILDING_INSTALLED/lib
35  else
36    export LD_LIBRARY_PATH=$GEXTPARALLELBUILDING_INSTALLED/lib:$LD_LIBRARY_PATH
37  fi
38
39  if [ "x$LDFLAGS" = "x" ] ; then
40    export LDFLAGS="-L$GEXTPARALLELBUILDING_INSTALLED/lib"
41  else
42    export LDFLAGS="-L$GEXTPARALLELBUILDING_INSTALLED/lib $LDFLAGS"
43  fi
44
45  extdir=${GEXTPARALLELBUILDING##*/}
46
47  if [ "x$GSDLEXTS" = "x" ] ; then
48    export GSDLEXTS=$extdir
49  else
50    export GSDLEXTS=$GSDLEXTS:$extdir
51  fi
52
53  echo "+Your environment is now setup for $extdesc in Greenstone"
54else
55  echo "+Your environment is already setup for $extdesc in Greenstone"
56fi
57
58
Note: See TracBrowser for help on using the browser.