Changeset 33931
- Timestamp:
- 2020-02-15T19:10:54+13:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/gs3-setup.sh
r32488 r33931 122 122 echo " - Adjusted LD_LIBRARY_PATH and DYLD_LIBRARY_PATH" 123 123 124 #ant125 ANT_VERSION=1.7.1126 if [ -x "$GSDL3SRCHOME/packages/ant/bin/ant" ]; then127 ANT_HOME="$GSDL3SRCHOME/packages/ant"128 export ANT_HOME129 addtopath PATH "$ANT_HOME/bin"130 echo " - Setup Greenstone ant ($GSDL3SRCHOME/packages/ant)"131 else132 which ant &> /dev/null133 if [ "$?" == "0" ]; then134 echo " - WARNING: Greenstone 'Ant' package missing - falling back to system Ant"135 echo " Note that Greenstone requires Ant $ANT_VERSION or greater"136 elif [ "ANT_HOME" != "" ]; then137 addtopath PATH "$ANT_HOME/bin"138 echo " - WARNING: Greenstone 'Ant' package missing - falling back to system Ant"139 echo " Note that Greenstone requires Ant $ANT_VERSION or greater"140 else141 echo " - ERROR: Greenstone 'Ant' package missing - please install Ant yourself"142 echo " Note that Greenstone requires Ant $ANT_VERSION or greater"143 fi144 fi145 146 124 #ImageMagick 147 125 #if test -d "$GSDL3SRCHOME/gs2build/bin/$GSDLOS/imagemagick" ; then … … 309 287 else 310 288 # search4j wasn't present, and no bundled JRE, so check JAVA_HOME or JRE_HOME manually 311 echo "*** Could not find an appropriate JDK or JRE java"312 echo "*** Attempting to use JAVA_HOME else JRE_HOME in the environment"313 289 #echo "*** Could not find an appropriate JDK or JRE java" 290 #echo "*** Attempting to use JAVA_HOME else JRE_HOME in the environment" 291 echo "Checking for Java explicitly set through environment variables" 314 292 if [ "$JAVA_HOME" != "" ] && [ "`which java`" == "$JAVA_HOME/bin/java" ]; then 315 echo " - Using java at $JAVA_HOME" 316 echo " - WARNING: Greenstone has not checked the version number of this java installation" 317 echo " The source distribution of Greenstone3 requires java 1.5 or greater" 318 echo " (SVN users may still use java 1.4)" 293 echo " - Using Java at $JAVA_HOME" 294 echo " - Detected Java version: `$JAVA_HOME/bin/java -version 2>&1 | head -n 1`" 295 echo " - Note that Greenstone requires Java 1.5 or greater" 296 # echo " - WARNING: Greenstone has not checked the version number of this java installation" 297 # echo " The source distribution of Greenstone3 requires java 1.5 or greater" 298 # echo " (SVN users may still use java 1.4)" 319 299 elif [ "$JRE_HOME" != "" ] && [ "`which java`" == "$JRE_HOME/bin/java" ]; then 320 300 echo " - Using java at $JRE_HOME" 321 echo " - WARNING: Greenstone has not checked the version number of this java installation" 322 echo " The source distribution of Greenstone3 requires java 1.5 or greater" 323 echo " (SVN users may still use java 1.4)" 301 echo " - Detected Java version: `$JAVA_HOME/bin/java -version 2>&1 | head -n 1`" 302 echo " - Note that Greenstone requires Java 1.5 or greater" 303 # echo " - WARNING: Greenstone has not checked the version number of this java installation" 304 # echo " The source distribution of Greenstone3 requires java 1.5 or greater" 305 # echo " (SVN users may still use java 1.4)" 324 306 325 307 #failing all that, print a warning … … 374 356 375 357 checkJavaBitnessAgainstGSBitness "$PATHTOJAVA" "$bitness" 376 358 check_status=$? 359 377 360 isjavaset=false 378 361 379 if [ "$ ?" == "0" ]; then362 if [ "$check_status" == "0" ]; then 380 363 # http://tldp.org/LDP/abs/html/comparison-ops.html 381 364 if [ "$bitness" != "-1" ] && [ "$DEBUG" == "true" ]; then … … 425 408 return 0 426 409 elif [ "$?" == "1" ]; then 427 return 1 410 411 # Newer Java's don't support -d, so result to using 'file' to determin bitness of 'java' binary 412 java_bitness=`file $java_installation/bin/java` 413 if [[ $java_bitness == *"$bitness-bit"* ]]; then 414 return 0 415 else 416 return 1 417 fi 428 418 else 429 419 echo "*** Problem determining bitness of java using java at $java_installation" … … 528 518 checkJava 529 519 echo "" 520 521 #ant 522 ANT_VERSION=1.7.1 523 echo "Checking for Ant" 524 if [ -x "$GSDL3SRCHOME/packages/ant/bin/ant" ]; then 525 ANT_HOME="$GSDL3SRCHOME/packages/ant" 526 export ANT_HOME 527 addtopath PATH "$ANT_HOME/bin" 528 echo " - Setup Greenstone ant ($GSDL3SRCHOME/packages/ant)" 529 else 530 if [ "ANT_HOME" != "" ]; then 531 addtopath PATH "$ANT_HOME/bin" 532 echo " - `ant -version`" 533 echo " - Note that Greenstone requires Ant $ANT_VERSION or greater" 534 else 535 which ant &> /dev/null 536 if [ "$?" == "0" ]; then 537 echo " - System install ant detected" 538 echo " - `ant -version`" 539 echo " - Note that Greenstone requires Ant $ANT_VERSION or greater" 540 else 541 echo " - WARNING: Failed to find 'ant'" 542 fi 543 fi 544 fi 545
Note:
See TracChangeset
for help on using the changeset viewer.