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