extdesc="TDB Database support" full_setup=`pwd`/${BASH_SOURCE} fulldir="${full_setup%/*}" fulldir="${fulldir%/.}" GSDLVER=0 # Test for one of the homes, otherwise we need to source a top-level setup if [ "${GSDL3HOME}x" != "x" ] ; then GSDLVER=3 fi if [ "${GSDLHOME}x" != "x" ] ; then GSDLVER=2 fi if [ "$GSDLVER" == "0" ] ; then export gsopt_noexts=1 CWD=`pwd` cd ../.. if [ -f "./gs3-setup.sh" ] ; then source ./gs3-setup.sh GSDLVER=3 else source ./setup.bash GSDLVER=2 fi cd "${CWD}" unset gsopt_noexts fi if [ "x$GEXTTDBEDIT" = "x" ] ; then export TDBEDITOS=`uname -s | tr '[A-Z]' '[a-z]' | sed 's/\([0-9]\+\)\?_.*$//'` export GEXTTDBEDIT="${fulldir}" export GEXTTDBEDIT_INSTALLED="${GEXTTDBEDIT}/${GSDLOS}" export PATH="${GEXTTDBEDIT_INSTALLED}/bin:${fulldir}/bin/script:${PATH}" if [ "x$LD_LIBRARY_PATH" = "x" ] ; then export LD_LIBRARY_PATH="${GEXTTDBEDIT_INSTALLED}/lib" else export LD_LIBRARY_PATH="${GEXTTDBEDIT_INSTALLED}/lib:${LD_LIBRARY_PATH}" fi extdir="${GEXTTDBEDIT##*/}" if [ "${GSDLVER}" = "3" ] ; then if [ "x${GSDL3EXTS}" = "x" ] ; then export GSDL3EXTS="${extdir}" else export GSDL3EXTS="${GSDL3EXTS}:${extdir}" fi else if [ "x${GSDLEXTS}" = "x" ] ; then export GSDLEXTS="${extdir}" else export GSDLEXTS="${GSDLEXTS}:${extdir}" fi fi echo "+Your environment is now setup for $extdesc for Greenstone${GSDLVER}" else echo "+Your environment is already setup for $extdesc for Greenstone${GSDLVER}" fi