source: gs3-extensions/openCV/trunk/src/setup.bash@ 29127

Last change on this file since 29127 was 29127, checked in by jmt12, 10 years ago

Prepare the environment for using the openCV extension under GSDL2

  • Property svn:executable set to *
File size: 1.7 KB
Line 
1# GEXTPARALLELBUILDING
2
3extdesc="the OpenCV Extension"
4
5full_setup=`pwd`/${BASH_SOURCE}
6fulldir=${full_setup%/*}
7fulldir=${fulldir%/.}
8
9if [ "x$GSDLHOME" = "x" ] ; then
10 if [ -e ../../setup.bash ] ; then
11 export gsopt_noexts=1 && pushd ../.. && source setup.bash && popd
12 export gsopt_noexts=
13 elif [ -e ../../gs3-setup.sh ] ; then
14 export gsopt_noexts=1 && pushd ../.. && source gs3-setup.sh && popd
15 export gsopt_noexts=
16 fi
17fi
18
19if test -z $GSDLOS ; then
20 GSDLOS=`uname -s | tr '[A-Z]' '[a-z]'`
21 # check for running bash under Cygwin
22 if [ test "`echo $GSDLOS | sed 's/cygwin//'`" != "$GSDLOS" ] ; then
23 GSDLOS=windows
24 fi
25 # check for running bash under MinGW/MSys
26 if [ test "`echo $GSDLOS | sed 's/mingw//'`" != "$GSDLOS" ] ; then
27 GSDLOS=windows
28 fi
29 echo "GSDLOS was not set. Setting it to '$GSDLOS'"
30 export GSDLOS
31fi
32
33if [ "x$GEXT_OPENCV" = "x" ] ; then
34 export GEXT_OPENCV=`pwd`
35 export GEXTOPENCV_INSTALLED=$GEXT_OPENCV/$GSDLOS
36
37 if [ -d "$GEXTOPENCV_INSTALLED/bin/script" ] ; then
38 export PATH=$GEXTOPENCV_INSTALLED/bin/script:$PATH
39 fi
40
41 if [ -d "$GEXTOPENCV_INSTALLED/bin" ] ; then
42 export PATH=$GEXTOPENCV_INSTALLED/bin:$PATH
43 fi
44
45 if [ -d "$GEXTOPENCV_INSTALLED/lib" ] ; then
46 if [ "$GSDLOS" = "linux" ] ; then
47 export LD_LIBRARY_PATH=$GEXTOPENCV_INSTALLED/lib:$LD_LIBRARY_PATH
48 elif [ "$GSDLOS" = "darwin" ] ; then
49 export DYLD_LIBRARY_PATH=$GEXTOPENCV_INSTALLED/lib:$DYLD_LIBRARY_PATH
50 fi
51 fi
52
53 extdir=${GEXT_OPENCV##*/}
54
55 if [ "x$GSDLEXTS" = "x" ] ; then
56 export GSDLEXTS=$extdir
57 else
58 export GSDLEXTS=$GSDLEXTS:$extdir
59 fi
60
61 echo "+Your environment is now setup for $extdesc in Greenstone"
62else
63 echo "+Your environment is already setup for $extdesc in Greenstone"
64fi
65
66
Note: See TracBrowser for help on using the repository browser.