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" ] ; then
|
---|
12 | GSDLVER=3
|
---|
13 | fi
|
---|
14 | if [ "${GSDLHOME}x" != "x" ] ; then
|
---|
15 | GSDLVER=2
|
---|
16 | fi
|
---|
17 |
|
---|
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 |
|
---|
33 | if [ "x$GEXTTDBEDIT" = "x" ] ; then
|
---|
34 |
|
---|
35 | export TDBEDITOS=`uname -s | tr '[A-Z]' '[a-z]' | sed 's/\([0-9]\+\)\?_.*$//'`
|
---|
36 | export GEXTTDBEDIT="${fulldir}"
|
---|
37 | export GEXTTDBEDIT_INSTALLED="${GEXTTDBEDIT}/${GSDLOS}"
|
---|
38 |
|
---|
39 | export PATH="${GEXTTDBEDIT_INSTALLED}/bin:${fulldir}/bin/script:${PATH}"
|
---|
40 |
|
---|
41 | if [ "x$LD_LIBRARY_PATH" = "x" ] ; then
|
---|
42 | export LD_LIBRARY_PATH="${GEXTTDBEDIT_INSTALLED}/lib"
|
---|
43 | else
|
---|
44 | export LD_LIBRARY_PATH="${GEXTTDBEDIT_INSTALLED}/lib:${LD_LIBRARY_PATH}"
|
---|
45 | fi
|
---|
46 |
|
---|
47 | extdir="${GEXTTDBEDIT##*/}"
|
---|
48 |
|
---|
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
|
---|
61 | fi
|
---|
62 |
|
---|
63 |
|
---|
64 |
|
---|
65 | echo "+Your environment is now setup for $extdesc for Greenstone${GSDLVER}"
|
---|
66 | else
|
---|
67 | echo "+Your environment is already setup for $extdesc for Greenstone${GSDLVER}"
|
---|
68 | fi
|
---|
69 |
|
---|
70 |
|
---|