source: gs2-extensions/rsync/trunk/src/setup.bash@ 23879

Last change on this file since 23879 was 23879, checked in by davidb, 13 years ago

Extra check added to look for Greenstone3 setup file

File size: 1.4 KB
Line 
1
2extdesc="the Rsync Extension"
3
4full_setup=`pwd`/${BASH_SOURCE}
5fulldir=${full_setup%/*}
6fulldir=${fulldir%/.}
7
8if [ "x$GSDLHOME" = "x" ] ; then
9 if [ -e ../../setup.bash ] ; then
10 export gsopt_noexts=1 && pushd ../.. && source setup.bash && popd
11 export gsopt_noexts=
12 elif [ -e ../../gs3-setup.sh ] ; then
13 export gsopt_noexts=1 && pushd ../.. && source gs3-setup.sh && popd
14 export gsopt_noexts=
15 fi
16
17fi
18
19if [ "x$GEXTRSYNC" = "x" ] ; then
20
21 export RSYNCOS=`uname -s | tr '[A-Z]' '[a-z]' | sed 's/\([0-9]\+\)\?_.*$//'`
22
23 if [ $RSYNCOS = "mingw" ] ; then
24 MINGW_CFLAGS="-Duint16_t=u_int16_t -Duint32_t=u_int32_t -Duint64_t=u_int64_t -Doff64_t=u_int64_t"
25
26 if [ "x$CFLAGS" = "x" ] ; then
27 export CFLAGS="$MINGW_CFLAGS"
28 else
29 export CFLAGS="$CFLAGS $MINGW_CFLAGS"
30 fi
31 fi
32
33
34 export GEXTRSYNC=$fulldir
35 export GEXTRSYNC_INSTALLED=$GEXTRSYNC/$GSDLOS
36
37 export PATH=$GEXTRSYNC_INSTALLED/bin:$PATH
38
39 if [ "x$LD_LIBRARY_PATH" = "x" ] ; then
40 export LD_LIBRARY_PATH=$GEXTRSYNC_INSTALLED/lib
41 else
42 export LD_LIBRARY_PATH=$GEXTRSYNC_INSTALLED/lib:$LD_LIBRARY_PATH
43 fi
44
45 extdir=${GEXTRSYNC##*/}
46
47 if [ "x$GSDLEXTS" = "x" ] ; then
48 export GSDLEXTS=$extdir
49 else
50 export GSDLEXTS=$GSDLEXTS:$extdir
51 fi
52
53 echo "+Your environment is now setup for $extdesc to Greenstone"
54else
55 echo "+Your environment is already setup for $extdesc to Greenstone"
56fi
57
58
Note: See TracBrowser for help on using the repository browser.