root/gs3-extensions/mars-src/trunk/setup.bash @ 34358

Revision 34358, 1.7 KB (checked in by davidb, 7 weeks ago)

Changed to be a Greenstone3 extension

Line 
1
2extdesc="the Music Affect Recommender System (MARS) Extension"
3
4full_setup=`pwd`/${BASH_SOURCE}
5fulldir=${full_setup%/*}
6fulldir=${fulldir%/.}
7
8if [ "x$GSDLHOME" = "x" ] ; then
9  if [ -e ../../gs3-setup.sh ] ; then
10    export gsopt_noexts=1 && pushd ../.. && source ./gs3-setup.sh && popd
11    export gsopt_noexts=
12  elif [ -e ../../setup.bash ] ; then
13    export gsopt_noexts=1 && pushd ../.. && source ./setup.bash && popd
14    export gsopt_noexts=
15  else
16    # backstop
17    GSDLOS=`uname -s | tr '[A-Z]' '[a-z]'`
18    # check for running bash under cygwin
19    if test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ; then
20      GSDLOS=windows
21    fi
22
23  fi
24fi
25
26if [ "x$GEXT_MARS" = "x" ] ; then
27  export GEXT_MARS=$fulldir
28  export GEXT_MARS_INSTALLED=$GEXT_MARS/$GSDLOS
29#  export GEXT_MARS_LIBJAVA=$GEXT_MARS/lib/java
30
31
32  export PATH=$GEXT_MARS_INSTALLED/bin:$GEXT_MARS/bin/script:$PATH
33
34  if [ "x$LD_LIBRARY_PATH" = "x" ] ; then
35    export LD_LIBRARY_PATH=$GEXT_MARS_INSTALLED/lib
36  else
37    export LD_LIBRARY_PATH=$GEXT_MARS_INSTALLED/lib:$LD_LIBRARY_PATH
38  fi
39  if [ "x$DYLD_LIBRARY_PATH" = "x" ] ; then
40    export DYLD_LIBRARY_PATH=$GEXT_MARS_INSTALLED/lib
41  else
42    export DYLD_LIBRARY_PATH=$GEXT_MARS_INSTALLED/lib:$DYLD_LIBRARY_PATH
43  fi
44 if [ "x$PKG_CONFIG_PATH" = "x" ] ; then
45    export PKG_CONFIG_PATH=$GEXT_MARS_INSTALLED/pkgconfig
46  else
47    export PKG_CONFIG_PATH=$GEXT_MARS_INSTALLED/pkgconfig:$PKG_CONFIG_PATH
48  fi
49
50  extdir=${GEXT_MARS##*/}
51
52  if [ "x$GSDL3EXTS" = "x" ] ; then
53    export GSDL3EXTS=$extdir
54  else
55    export GSDL3EXTS=$GSDL3EXTS:$extdir
56  fi
57
58  echo "+Your environment is now setup for $extdesc"
59else
60  echo "+Your environment is already setup for $extdesc"
61fi
Note: See TracBrowser for help on using the browser.