Changeset 5003
- Timestamp:
- 2003-07-22T14:28:46+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/gli.sh
r4957 r5003 2 2 3 3 4 ## -- Run the Greenstone Librarian Interface--4 ## -------- Run the Greenstone Librarian Interface -------- 5 5 6 # Script must be run from within the directory in which it lives6 # This script must be run from within the directory in which it lives 7 7 thisdir=`pwd` 8 8 if [ ! -f "${thisdir}/gli.sh" ]; then … … 12 12 13 13 14 ## -- Determine GSDLHOME--15 gsdl home=14 ## ---- Determine GSDLHOME ---- 15 gsdlpath= 16 16 17 17 # Some users may set the above line manually 18 if [ "$gsdl home" == "" ]; then18 if [ "$gsdlpath" == "" ]; then 19 19 # Check the environment variable first 20 20 if [ "$GSDLHOME" != "" ]; then 21 gsdl home=$GSDLHOME21 gsdlpath=$GSDLHOME 22 22 23 23 # If it is not set, assume that the GLI is installed as a subdirectory of Greenstone 24 24 else 25 25 pushd .. > /dev/null 26 gsdl home=`pwd`26 gsdlpath=`pwd` 27 27 popd > /dev/null 28 28 fi … … 30 30 31 31 # Check that the Greenstone installation looks OK 32 if [ ! -x "${gsdlhome}/setup.bash" ] ; then 33 echo "The Greenstone installation at ${gsdlhome} does not" 34 echo "appear to be complete. Try reinstalling Greenstone then running" 35 echo "this script again." 32 echo "Checking GSDL: $gsdlpath" 33 if [ ! -x "${gsdlpath}/setup.bash" ] ; then 34 echo 35 echo "The Greenstone installation could not be found, or is incomplete." 36 echo "Try reinstalling Greenstone then running this script again." 36 37 exit 1 37 38 fi 38 39 39 # Setup Greenstone 40 pushd $gsdlhome > /dev/null 41 source setup.bash 42 echo 43 popd > /dev/null 40 # Setup Greenstone, unless it has already been done 41 if [ "$GSDLHOME" == "" ]; then 42 pushd $gsdlpath > /dev/null 43 source setup.bash 44 popd > /dev/null 45 fi 44 46 45 47 46 ## -- Check Perl exists--48 ## ---- Check Perl exists ---- 47 49 perlpath= 48 50 49 51 # Some users may set the above line manually 50 52 if [ "$perlpath" == "" ]; then 51 # Try to find iton the search path53 # Check if Perl is on the search path 52 54 perlpath=`which perl 2> /dev/null` 53 55 fi 54 56 57 # Check that a Perl executable has been found 58 echo "Checking Perl: $perlpath" 55 59 if [ ! -x "$perlpath" ] ; then 56 echo "The Greestone Librarian Interface requires perl in order to operate but"57 echo " this installation could not detect perl on your system. Please ensure"58 echo " that perl is installed and is on your search path, then rerun this"59 echo " script."60 echo 61 echo "The Greestone Librarian Interface requires perl in order to operate," 62 echo "but perl could not be detected on your system. Please ensure that perl" 63 echo "is installed and is on your search path, then rerun this script." 60 64 exit 1 61 65 fi 62 66 63 67 64 ## -- Check Java exists--68 ## ---- Check Java exists ---- 65 69 javapath= 66 70 67 71 # Some users may set the above line manually 68 72 if [ "$javapath" == "" ]; then 69 # Check the environment variable first 73 74 # If it is set, use the JAVAHOME environment variable 70 75 if [ "$JAVAHOME" != "" ]; then 71 76 javapath="$JAVAHOME/bin/java" 72 77 73 # If it is not set, hope itis on the search path78 # Check if Java is on the search path 74 79 else 75 80 javapath=`which java 2> /dev/null` … … 77 82 fi 78 83 84 # Check that a Java executable has been found 85 echo "Checking Java: $javapath" 79 86 if [ ! -x "$javapath" ]; then 80 echo "Failed to locate Java. You must install a Java Runtime Environment" 81 echo "(version 1.4 or greater) before running the Greenstone Librarian Interface." 87 echo 88 echo "Failed to locate an appropriate version of Java. You must install a" 89 echo "Java Runtime Environment (version 1.4 or greater) before running the" 90 echo "Greenstone Librarian Interface." 82 91 exit 1 83 92 fi … … 97 106 fi 98 107 if [ $jok -eq 0 ] ; then 108 echo 99 109 echo "The version of the Java Runtime Environment you have installed is too" 100 echo "old to run the Greenstone Librarian Interface. Please install a new version"101 echo " of the JRE (version 1.4 or newer) and rerun this script."110 echo "old to run the Greenstone Librarian Interface. Please install a new" 111 echo "version of the JRE (version 1.4 or newer) and rerun this script." 102 112 exit 1 103 113 fi 104 114 105 115 106 ## -- Check that the GLI has been compiled--116 ## ---- Check that the GLI has been compiled ---- 107 117 if [ ! -f "classes/org/greenstone/gatherer/Gatherer.class" ]; then 108 echo "You need to compile the Greenstone Librarian Interface using makegli.sh" 118 echo 119 echo "You need to compile the Greenstone Librarian Interface (using makegli.sh)" 109 120 echo "before running this script." 110 121 exit 1 … … 112 123 113 124 114 ## -- Finally, run the GLI--115 125 ## ---- Finally, run the GLI ---- 126 echo 116 127 echo "Running the Greenstone Librarian Interface..." 117 128
Note:
See TracChangeset
for help on using the changeset viewer.