Changeset 8901


Ignore:
Timestamp:
2005-01-17T16:35:59+13:00 (19 years ago)
Author:
mdewsnip
Message:

Changed scripts to use a hopefully much more robust method for checking that the version of Java is new enough to run the GLI: run a tiny Java program (CheckJavaVersion).

Location:
trunk/gli
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/gli.sh

    r8254 r8901  
    194194
    195195## -- Check the version of Java is new enough (1.4.0 or higher) to run the GLI --
    196 javaversion=`$javapath -version 2>&1 | sed -n 's/^java version \"\(.*\)\"/\1/p'`
    197 jvmajor=`echo $javaversion | sed -n 's/^\([0-9]*\).*$/\1/p'`
    198 jvminor=`echo $javaversion | sed -n 's/^[0-9]*\.\([0-9]*\).*$/\1/p'`
    199 
    200 jok=1
    201 if [ $jvmajor -lt 1 ] ; then
    202     jok=0
    203 fi
    204 if [ $jvmajor -eq 1 ] && [ $jvminor -lt 4 ] ; then
    205     jok=0
    206 fi
    207 if [ $jok -eq 0 ] ; then
     196`$javapath CheckJavaVersion > /dev/null`
     197if [ $? -ne 2 ] ; then
    208198    echo
    209199    if [ "$glilang" == "es" ]; then
     
    236226## ---- Check that the GLI has been compiled ----
    237227if [ ! -f "classes/org/greenstone/gatherer/GathererProg.class" ] && [ ! -f "GLI.jar" ]; then
    238     echo
     228    echo
    239229    if [ "$glilang" == "es" ]; then
    240230    echo "Usted necesita compilar la Interfaz de la Biblioteca Digital Greenstone"
  • trunk/gli/gli4gs3.sh

    r8254 r8901  
    246246
    247247## -- Check the version of Java is new enough (1.4.0 or higher) to run the GLI --
    248 javaversion=`$javapath -version 2>&1 | sed -n 's/^java version \"\(.*\)\"/\1/p'`
    249 jvmajor=`echo $javaversion | sed -n 's/^\([0-9]*\).*$/\1/p'`
    250 jvminor=`echo $javaversion | sed -n 's/^[0-9]*\.\([0-9]*\).*$/\1/p'`
    251 
    252 jok=1
    253 if [ $jvmajor -lt 1 ] ; then
    254     jok=0
    255 fi
    256 if [ $jvmajor -eq 1 ] && [ $jvminor -lt 4 ] ; then
    257     jok=0
    258 fi
    259 if [ $jok -eq 0 ] ; then
     248`$javapath CheckJavaVersion > /dev/null`
     249if [ $? -ne 2 ] ; then
    260250    echo
    261251    if [ "$glilang" == "es" ]; then
Note: See TracChangeset for help on using the changeset viewer.