source: gs2-extensions/tesseract/trunk/src/setup.bash@ 34180

Last change on this file since 34180 was 34180, checked in by ak19, 4 years ago

Gnome-lib has setup.bash_old and setup.bat_old, but imagemagick and pdf-box (and now gstika) have setup.bash and setup.bat. I think this is because gnome-lib is needed for compiling Greenstone but doesn't get loaded as an regular extension when running GS3 or building collections, whereas the other gs2-extensions do (so GEXT is set for pdfbox and now gstika etc. Previously followed the gnome-lib pattern for tesseract gs2-extension, and source gs3-setup didn't detect it until tesseracts setup.bash_old was renamed to setup.bash. So I think renaming that and setup.bat_old on svn is the way forward. I think.

  • Property svn:executable set to *
File size: 1.6 KB
Line 
1extdesc="the Tesseract OCR support library extension"
2
3full_setup=`pwd`/${BASH_SOURCE}
4fulldir=${full_setup%/*}
5fulldir=${fulldir%/.}
6
7if [ "x$GSDLHOME" = "x" ] ; then
8 if [ -e ../../setup.bash ] ; then
9 export gsopt_noexts=1 && pushd ../.. && source ./setup.bash && popd
10 export gsopt_noexts=
11 elif [ -e ../../gs3-setup.sh ] ; then
12 export gsopt_noexts=1 && pushd ../.. && source ./gs3-setup.sh && popd
13 export gsopt_noexts=
14 fi
15fi
16
17if [ "x$GEXTTESS" = "x" ] ; then
18 export GEXTTESS=$fulldir
19 export GEXTTESS_INSTALLED=$GEXTTESS/$GSDLOS
20
21 # tesseract needs the TESSDATA_PREFIX env var set to the languages folder (tessdata)
22 export TESSDATA_PREFIX=$GEXTTESS_INSTALLED/tessdata
23
24 export PATH=$GEXTTESS_INSTALLED/bin:$PATH
25
26 # if [ "x$LD_LIBRARY_PATH" = "x" ] ; then
27 # export LD_LIBRARY_PATH=$GEXTTESS_INSTALLED/lib
28 # else
29 # export LD_LIBRARY_PATH=$GEXTTESS_INSTALLED/lib:$LD_LIBRARY_PATH
30 # fi
31 # if [ "x$DYLD_LIBRARY_PATH" = "x" ] ; then
32 # export DYLD_LIBRARY_PATH=$GEXTTESS_INSTALLED/lib
33 # else
34 # export DYLD_LIBRARY_PATH=$GEXTTESS_INSTALLED/lib:$DYLD_LIBRARY_PATH
35 # fi
36 #
37 # if [ -e "devel-srcpack" ] ; then
38 # export LD_LIBRARY_PATH=$GEXTTESS_INSTALLED/devel/lib:$LD_LIBRARY_PATH
39 # export DYLD_LIBRARY_PATH=$GEXTTESS_INSTALLED/devel/lib:$DYLD_LIBRARY_PATH
40 # fi
41
42
43 extdir=${GEXTTESS##*/}
44
45 if [ "x$GSDLEXTS" = "x" ] ; then
46 export GSDLEXTS=$extdir
47 else
48 export GSDLEXTS=$GSDLEXTS:$extdir
49 fi
50
51
52 echo "+Your environment is now setup for $extdesc"
53else
54 echo "+Your environment is already setup for $extdesc"
55fi
Note: See TracBrowser for help on using the repository browser.