Changeset 3832 for trunk/gsdl3


Ignore:
Timestamp:
2003-03-10T15:34:40+13:00 (21 years ago)
Author:
mdewsnip
Message:

Now checks $JAVA_HOME is set, Java programs exist, and Java version is 1.4.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/setup.bash

    r3695 r3832  
    4949  export LD_LIBRARY_PATH
    5050
    51   #set up java - should this be done here?
    52   JAVA_HOME=/usr/local/share/j2sdk1.4.0/
    53   export JAVA_HOME
    54   PATH=/usr/local/share/j2sdk1.4.0/bin:$PATH
    55   export PATH
    56 
    5751  #set up java options for catalina
    5852  CATALINA_OPTS="-Djava.util.prefs.syncInterval=2000000 -DGSDL3HOME=$GSDL3HOME -DGSDLOS=$GSDLOS -DGSDLHOME=$GSDLHOME -DPATH=$PATH"
    5953  export CATALINA_OPTS
    6054
    61   echo "Your environment has successfully been set up to run Greenstone3"
    62   if test ! -n "$GSDLHOME" ; then
    63    echo "However, if you want to run greenstone 2 compatible building, then you need to 'source setup.bash' in  the home directory of your greenstone 2 installation, and then re-source this script"
     55  # Make sure JAVA_HOME is set
     56  if test ! -n "$JAVA_HOME" ; then
     57    echo "Error: JAVA_HOME variable not set."
     58  # Make sure the Java executable is in JAVA_HOME/bin/
     59  elif test ! -f "$JAVA_HOME/bin/java"; then
     60    echo "Error: Java executable not found."
     61  # Make sure the Java version is 1.4 (should really check for 1.4 or higher)
     62  elif test ! -n "`$JAVA_HOME/bin/java -version 2>&1 | grep 'version \"1.4'`" ; then
     63    echo "Error: Java version 1.4.0 required."
     64  else
     65    echo "Your environment has successfully been set up to run Greenstone3"
     66    if test ! -n "$GSDLHOME" ; then
     67      echo "However, if you want to run greenstone 2 compatible building, then you need to 'source setup.bash' in  the home directory of your greenstone 2 installation, and then re-source this script"
     68    fi
    6469  fi
    65 
    6670
    6771
Note: See TracChangeset for help on using the changeset viewer.