Changeset 20189
- Timestamp:
- 2009-08-10T12:03:41+12:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
greenstone3/trunk/gs3-setup.sh
r20187 r20189 35 35 if test ! -f gs3-setup.sh ; then 36 36 echo "You must source the script from within the Greenstone home directory" 37 exit 1 38 fi 39 37 return 1 38 fi 39 return 0 40 } 41 42 # if GSDL3SRCHOME is set, then we assume that we have already sourced the 43 # script so don't do it again. UNLESS, GSDL3SRCHOME doesn't match the 44 # current directory in which case it was a different gs3 installation, so lets 45 # do it now.x 46 function testAlreadySourced() { 47 if [ ! -z "$GSDL3SRCHOME" ]; then 48 localgs3sourcehome="`pwd`" 49 if [ "$GSDL3SRCHOME" == "$localgs3sourcehome" ]; then 50 echo "Your environment is already set up for Greenstone3" 51 return 1 52 fi 53 echo "Your environment was set up for Greenstone 3 in $GSDL3SRCHOME." 54 echo "Overwriting that set up for the current Greenstone 3 in $localgs3sourcehome" 55 fi 56 return 0 40 57 } 41 58 … … 170 187 } 171 188 189 # Note: use return not exit from a sourced script otherwise it kills the shell 172 190 echo 173 191 testSource 192 if [ "$?" == "1" ]; then 193 return 194 fi 195 testAlreadySourced 196 if [ "$?" == "1" ]; then 197 return 198 fi 174 199 setGS3ENV 175 200 checkJava
Note:
See TracChangeset
for help on using the changeset viewer.