# GEXT: XPDFTOOLS extdesc="the Xpdf-Tools Extension" full_setup=`pwd`/${BASH_SOURCE} fulldir=${full_setup%/*} fulldir=${fulldir%/.} if [ "x$GSDLHOME" = "x" ] ; then if [ -e ../../setup.bash ] ; then export gsopt_noexts=1 && pushd ../.. && source setup.bash && popd export gsopt_noexts= elif [ -e ../../gs3-setup.sh ] ; then export gsopt_noexts=1 && pushd ../.. && source gs3-setup.sh && popd export gsopt_noexts= fi fi if test -z $GSDLOS ; then GSDLOS=`uname -s | tr '[A-Z]' '[a-z]'` # check for running bash under Cygwin if [ test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ] ; then GSDLOS=windows fi # check for running bash under MinGW/MSys if [ test "`echo $GSDLOS | sed 's/mingw//'`" != "$GSDLOS" ] ; then GSDLOS=windows fi echo "GSDLOS was not set. Setting it to '$GSDLOS'" export GSDLOS fi if [ "x$GEXT_XPDFTOOLS" = "x" ] ; then export GEXT_XPDFTOOLS=`pwd` export GEXTXPDFTOOLS_INSTALLED=$GEXT_XPDFTOOLS/$GSDLOS if [ -d "$GEXTXPDFTOOLS_INSTALLED/bin/script" ] ; then export PATH=$GEXTXPDFTOOLS_INSTALLED/bin/script:$PATH fi if [ -d "$GEXTXPDFTOOLS_INSTALLED/bin" ] ; then export PATH=$GEXTXPDFTOOLS_INSTALLED/bin:$PATH fi if [ -d "$GEXTXPDFTOOLS_INSTALLED/lib" ] ; then if [ "$GSDLOS" = "linux" ] ; then export LD_LIBRARY_PATH=$GEXTXPDFTOOLS_INSTALLED/lib:$LD_LIBRARY_PATH elif [ "$GSDLOS" = "darwin" ] ; then export DYLD_LIBRARY_PATH=$GEXTXPDFTOOLS_INSTALLED/lib:$DYLD_LIBRARY_PATH fi fi extdir=${GEXT_XPDFTOOLS##*/} if [ "x$GSDLEXTS" = "x" ] ; then export GSDLEXTS=$extdir else export GSDLEXTS=$GSDLEXTS:$extdir fi if [ "x$1" != "xsilent" ] ; then echo "+Your environment is now setup for $extdesc in Greenstone" fi else if [ "x$1" != "xsilent" ] ; then echo "+Your environment is already setup for $extdesc in Greenstone" fi fi # XPDFTOOLS is a GS2 extension, as it should be common to GS2 and GS3. # This becomes circular if done in a GS2 extension. # But in a GS3 extension, devel.bash should source gs3-setup.sh which doesn't source devel.bash # From http://trac.greenstone.org/browser/other-projects/trunk/realistic-books/setup.bash #if [ -e devel.sh ] ; then # source devel.sh $* #fi