1 |
|
---|
2 | extdesc="TDB Database support"
|
---|
3 |
|
---|
4 | full_setup=`pwd`/${BASH_SOURCE}
|
---|
5 | fulldir="${full_setup%/*}"
|
---|
6 | fulldir="${fulldir%/.}"
|
---|
7 |
|
---|
8 | GSDLVER=0
|
---|
9 |
|
---|
10 | # Test for one of the homes, otherwise we need to source a top-level setup
|
---|
11 | if [ "${GSDL3HOME}x" != "x" ]
|
---|
12 | then
|
---|
13 | GSDLVER=3
|
---|
14 | else
|
---|
15 | if [ "${GSDLHOME}x" != "x" ]
|
---|
16 | then
|
---|
17 | GSDLVER=2
|
---|
18 | fi
|
---|
19 | fi
|
---|
20 |
|
---|
21 | if [ "$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
|
---|
34 | fi
|
---|
35 |
|
---|
36 | if [ "x$GEXTTDBEDIT" = "x" ] ; then
|
---|
37 |
|
---|
38 | export TDBEDITOS=`uname -s | tr '[A-Z]' '[a-z]' | sed 's/\([0-9]\+\)\?_.*$//'`
|
---|
39 | export GEXTTDBEDIT="${fulldir}"
|
---|
40 | export GEXTTDBEDIT_INSTALLED="${GEXTTDBEDIT}/${GSDLOS}"
|
---|
41 |
|
---|
42 | export PATH="${GEXTTDBEDIT_INSTALLED}/bin:${fulldir}/bin/script:${PATH}"
|
---|
43 |
|
---|
44 | if [ "x$LD_LIBRARY_PATH" = "x" ] ; then
|
---|
45 | export LD_LIBRARY_PATH="${GEXTTDBEDIT_INSTALLED}/lib"
|
---|
46 | else
|
---|
47 | export LD_LIBRARY_PATH="${GEXTTDBEDIT_INSTALLED}/lib:${LD_LIBRARY_PATH}"
|
---|
48 | fi
|
---|
49 |
|
---|
50 | extdir="${GEXTTDBEDIT##*/}"
|
---|
51 |
|
---|
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
|
---|
64 | fi
|
---|
65 |
|
---|
66 |
|
---|
67 |
|
---|
68 | echo "+Your environment is now setup for $extdesc for Greenstone${GSDLVER}"
|
---|
69 | else
|
---|
70 | echo "+Your environment is already setup for $extdesc for Greenstone${GSDLVER}"
|
---|
71 | fi
|
---|
72 |
|
---|
73 |
|
---|