Changeset 35314 for main/trunk/greenstone3/gs3-setup.sh
- Timestamp:
- 2021-08-20T23:08:32+12:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/gs3-setup.sh
r35311 r35314 239 239 elif [ ! -f "$TESTFILE" ]; then 240 240 # the file we want to test the bitness of, to determine GS3's bitness by, doesn't exist yet 241 echo " $TESTFILE is not found, unable to determine bitness of this Greenstone3" 241 # echo " $TESTFILE is not found, unable to determine bitness of this Greenstone3" 242 echo " - No JNI files detected. Skipping Java bitness test" 242 243 bitness=-1 243 244 else … … 245 246 if [[ $bitness = *"64-bit"* ]]; then 246 247 bitness=64 247 echo "The installed Greenstone is $bitness bit"248 # echo "The installed Greenstone is $bitness bit" 248 249 elif [[ $bitness = *"32-bit"* ]]; then 249 250 bitness=32 250 echo "The installed Greenstone is $bitness bit"251 # echo "The installed Greenstone is $bitness bit" 251 252 else 252 253 bitness=-1 253 echo "WARNING: Greenstone installation is of unknown bitness. \"$bitness\" is neither 32 nor 64 bit"254 fi 255 fi256 echo bitness = $bitness254 echo "WARNING: Greenstone installation is of unknown bitness. \"$bitness\" is neither '32-bit' nor '64-bit'" 255 fi 256 echo "JNI bitness test: $bitness" 257 fi 257 258 258 259 # If search4j is present, use it to locate a java. … … 262 263 # we'll print a warning about this bitness mismatch at the end 263 264 265 echo "" 266 echo "Checking for Java" 267 264 268 javaset=false 265 269 if [ -x bin/search4j ] ; then … … 323 327 #echo "*** Could not find an appropriate JDK or JRE java" 324 328 #echo "*** Attempting to use JAVA_HOME else JRE_HOME in the environment" 325 echo " Checking for Java explicitly set through environment variables"329 echo " - search4j' not detected. Checking for Java explicitly set through environment variables" 326 330 if [ "$JAVA_HOME" != "" ] && [ "`which java`" = "$JAVA_HOME/bin/java" ]; then 327 331 echo " - Using Java at $JAVA_HOME" 328 echo " - Detected Java version: `$JAVA_HOME/bin/java -version 2>&1 | head -n 1`" 329 echo " - Note that Greenstone requires Java 1.5 or greater" 330 # echo " - WARNING: Greenstone has not checked the version number of this java installation" 331 # echo " The source distribution of Greenstone3 requires java 1.5 or greater" 332 # echo " (SVN users may still use java 1.4)" 332 if [ "$DEBUG" = "true" ] ; then 333 echo " - Detected Java version: `$JAVA_HOME/bin/java -version 2>&1 | head -n 1`" 334 echo " - Note that Greenstone requires Java 1.5 or greater" 335 # echo " - WARNING: Greenstone has not checked the version number of this java installation" 336 # echo " The source distribution of Greenstone3 requires java 1.5 or greater" 337 # echo " (SVN users may still use java 1.4)" 338 fi 333 339 elif [ "$JRE_HOME" != "" ] && [ "`which java`" = "$JRE_HOME/bin/java" ]; then 334 340 echo " - Using java at $JRE_HOME" 335 echo " - Detected Java version: `$JAVA_HOME/bin/java -version 2>&1 | head -n 1`" 336 echo " - Note that Greenstone requires Java 1.5 or greater" 337 # echo " - WARNING: Greenstone has not checked the version number of this java installation" 338 # echo " The source distribution of Greenstone3 requires java 1.5 or greater" 339 # echo " (SVN users may still use java 1.4)" 340 341 if [ "$DEBUG" = "true" ] ; then 342 echo " - Detected Java version: `$JAVA_HOME/bin/java -version 2>&1 | head -n 1`" 343 echo " - Note that Greenstone requires Java 1.5 or greater" 344 # echo " - WARNING: Greenstone has not checked the version number of this java installation" 345 # echo " The source distribution of Greenstone3 requires java 1.5 or greater" 346 # echo " (SVN users may still use java 1.4)" 347 fi 341 348 #failing all that, print a warning 342 349 else 343 #no suitable java exists 344 echo " - ERROR: Failed to locate java" 345 echo " Please set JAVA_HOME or JRE_HOME to point to an appropriate java" 346 echo " And add JAVA_HOME/bin or JRE_HOME/bin to your PATH" 347 return 350 echo " - Did not detect 'java' via JAVA_HOME or JRE_HOME" 351 echo "Testing for 'java' on PATH" 352 command -v java 353 if [ $? != 0 ] ; then 354 #no suitable java exists 355 echo " - Error: Failed to locate 'java'" 356 echo " Please set JAVA_HOME or JRE_HOME to point to an appropriate java" 357 echo " And add JAVA_HOME/bin or JRE_HOME/bin to your PATH" 358 return 359 fi 348 360 fi 349 361 fi … … 522 534 setGS3ENV 523 535 524 echo "done"525 526 536 if test -e gs2build/setup.bash ; then 527 537 echo "" … … 586 596 fi 587 597 598 echo "done" 599
Note:
See TracChangeset
for help on using the changeset viewer.