source: gs2-extensions/tdb/trunk/setup.bash@ 30436

Last change on this file since 30436 was 30266, checked in by jmt12, 9 years ago

Altered a test for Greenstone version so it doesn't (incorrectly) set GS3 to 2 as well since it also sets a GSDLHOME

File size: 1.5 KB
RevLine 
[23905]1
[30252]2extdesc="TDB Database support"
[23905]3
4full_setup=`pwd`/${BASH_SOURCE}
[30252]5fulldir="${full_setup%/*}"
6fulldir="${fulldir%/.}"
[23905]7
[30252]8GSDLVER=0
[23905]9
[30252]10# Test for one of the homes, otherwise we need to source a top-level setup
[30266]11if [ "${GSDL3HOME}x" != "x" ]
12then
[30252]13 GSDLVER=3
[30266]14else
15 if [ "${GSDLHOME}x" != "x" ]
16 then
17 GSDLVER=2
18 fi
[23905]19fi
20
[30252]21if [ "$GSDLVER" == "0" ] ; then
22 export gsopt_noexts=1
23 CWD=`pwd`
24 cd ../..
25 if [ -f "./gs3-setup.sh" ] ; then
26 source ./gs3-setup.sh
27 GSDLVER=3
28 else
29 source ./setup.bash
30 GSDLVER=2
31 fi
32 cd "${CWD}"
33 unset gsopt_noexts
34fi
35
[23905]36if [ "x$GEXTTDBEDIT" = "x" ] ; then
37
38 export TDBEDITOS=`uname -s | tr '[A-Z]' '[a-z]' | sed 's/\([0-9]\+\)\?_.*$//'`
[30252]39 export GEXTTDBEDIT="${fulldir}"
40 export GEXTTDBEDIT_INSTALLED="${GEXTTDBEDIT}/${GSDLOS}"
[23905]41
[30252]42 export PATH="${GEXTTDBEDIT_INSTALLED}/bin:${fulldir}/bin/script:${PATH}"
[23905]43
44 if [ "x$LD_LIBRARY_PATH" = "x" ] ; then
[30252]45 export LD_LIBRARY_PATH="${GEXTTDBEDIT_INSTALLED}/lib"
[23905]46 else
[30252]47 export LD_LIBRARY_PATH="${GEXTTDBEDIT_INSTALLED}/lib:${LD_LIBRARY_PATH}"
[23905]48 fi
49
[30252]50 extdir="${GEXTTDBEDIT##*/}"
[23905]51
[30252]52 if [ "${GSDLVER}" = "3" ] ; then
53 if [ "x${GSDL3EXTS}" = "x" ] ; then
54 export GSDL3EXTS="${extdir}"
55 else
56 export GSDL3EXTS="${GSDL3EXTS}:${extdir}"
57 fi
58 else
59 if [ "x${GSDLEXTS}" = "x" ] ; then
60 export GSDLEXTS="${extdir}"
61 else
62 export GSDLEXTS="${GSDLEXTS}:${extdir}"
63 fi
[23905]64 fi
65
[30252]66
67
68 echo "+Your environment is now setup for $extdesc for Greenstone${GSDLVER}"
[23905]69else
[30252]70 echo "+Your environment is already setup for $extdesc for Greenstone${GSDLVER}"
[23905]71fi
72
73
Note: See TracBrowser for help on using the repository browser.