Index: /trunk/gli/gli.sh
===================================================================
--- /trunk/gli/gli.sh	(revision 6701)
+++ /trunk/gli/gli.sh	(revision 6702)
@@ -1,9 +1,13 @@
 #!/bin/sh
+glilang=
 
 echo
-echo 'Greenstone Librarian Interface (GLI)'
-echo 'Copyright (C) 2004, New Zealand Digital Library Project, University Of Waikato'
-echo 'GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt'
-echo 'This is free software, and you are welcome to redistribute it'
+if [ "$glilang" == "ru" ]; then
+else
+    echo 'Greenstone Librarian Interface (GLI)'
+    echo 'Copyright (C) 2004, New Zealand Digital Library Project, University Of Waikato'
+    echo 'GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt'
+    echo 'This is free software, and you are welcome to redistribute it'
+fi
 echo
 
@@ -13,5 +17,9 @@
 thisdir=`pwd`
 if [ ! -f "${thisdir}/gli.sh" ]; then
-    echo "This script must be run from the directory in which it resides."
+    if [ "$glilang" == "ru" ]; then
+	echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ"
+    else
+	echo "This script must be run from the directory in which it resides."
+    fi
     exit 1
 fi
@@ -36,9 +44,18 @@
 
 # Check that the Greenstone installation looks OK
-echo "Checking GSDL: $gsdlpath"
+if [ "$glilang" == "ru" ]; then
+    echo "ðÒÏ×ÅÒËÁ GSDL: $gsdlpath"
+else
+    echo "Checking GSDL: $gsdlpath"
+fi
 if [ ! -f "${gsdlpath}/setup.bash" ] ; then
     echo
-    echo "The Greenstone installation could not be found, or is incomplete."
-    echo "Try reinstalling Greenstone then running this script again."
+    if [ "$glilang" == "ru" ]; then
+	echo "éÎÓÔÁÌÌÑÃÉÑ Greenstone ÎÅ ÂÙÌÁ ÎÁÊÄÅÎÁ ÉÌÉ ÏÎÁ ÎÅÐÏÌÎÁ."
+	echo "ðÏÐÒÏÂÕÊÔÅ ÐÏ×ÔÏÒÎÏ ÕÓÔÁÎÏ×ÉÔØ Greenstone, Á ÚÁÔÅÍ ××ÅÓÔÉ ÜÔÏÔ ÓËÒÉÐÔ ÓÎÏ×Á."
+    else
+	echo "The Greenstone installation could not be found, or is incomplete."
+	echo "Try reinstalling Greenstone then running this script again."
+    fi
     exit 1
 fi
@@ -62,10 +79,21 @@
 
 # Check that a Perl executable has been found
-echo "Checking Perl: $perlpath"
+if [ "$glilang" == "ru" ]; then
+    echo "ðÒÏ×ÅÒËÁ Perl: $perlpath"
+else
+    echo "Checking Perl: $perlpath"
+fi
 if [ ! -x "$perlpath" ] ; then
     echo
-    echo "The Greenstone Librarian Interface requires perl in order to operate,"
-    echo "but perl could not be detected on your system. Please ensure that perl"
-    echo "is installed and is on your search path, then rerun this script."
+    if [ "$glilang" == "ru" ]; then
+	echo "âÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone ÔÒÅÂÕÅÔ Perl, ÞÔÏÂÙ ÉÍÅÔØ ×ÏÚÍÏÖÎÏÓÔØ"
+	echo "ÒÁÂÏÔÁÔØ, ÎÏ Perl ÎÅ ÂÙÌ × ×ÁÛÅÊ ÓÉÓÔÅÍÅ. ðÏÖÁÌÕÊÓÔÁ, ÐÏÄÔ×ÅÒÄÉÔÅ, ÞÔÏ "
+	echo "Perl ÕÓÔÁÎÏ×ÌÅÎ É ÎÁÈÏÄÉÔÓÑ ÎÁ ×ÁÛÅÍ ÐÕÔÉ ÐÏÉÓËÁ, ÚÁÔÅÍ ÐÏ×ÔÏÒÎÏ××ÅÄÉÔÅ"
+	echo "ÜÔÏÔ ÓËÒÉÐÔ."
+    else
+	echo "The Greenstone Librarian Interface requires perl in order to operate,"
+	echo "but perl could not be detected on your system. Please ensure that perl"
+	echo "is installed and is on your search path, then rerun this script."
+    fi
     exit 1
 fi
@@ -89,10 +117,20 @@
 
 # Check that a Java executable has been found
-echo "Checking Java: $javapath"
+if [ "$glilang" == "ru" ]; then
+    echo "ðÒÏ×ÅÒËÁ Java: $javapath"
+else
+    echo "Checking Java: $javapath"
+fi
 if [ ! -x "$javapath" ]; then
     echo
-    echo "Failed to locate an appropriate version of Java. You must install a"
-    echo "Java Runtime Environment (version 1.4 or greater) before running the"
-    echo "Greenstone Librarian Interface."
+    if [ "$glilang" == "ru" ]; then
+	echo "îÅ ÕÄÁÌÏÓØ ÏÐÒÅÄÅÌÉÔØ ÍÅÓÔÏÎÁÈÏÖÄÅÎÉÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ×ÅÒÓÉÉ Java."
+	echo "÷Ù ÄÏÌÖÎÙ ÕÓÔÁÎÏ×ÉÔØ Java Runtime Environment (×ÅÒÓÉÀ 1.4 ÉÌÉ ×ÙÛÅ)"
+	echo "ÐÅÒÅÄ ××ÏÄÏÍ ÂÉÂÌÉÏÔÅÞÎÏÇÏ ÉÎÔÅÒÆÅÊÓÁ Greenstone."
+    else
+	echo "Failed to locate an appropriate version of Java. You must install a"
+	echo "Java Runtime Environment (version 1.4 or greater) before running the"
+	echo "Greenstone Librarian Interface."
+    fi
     exit 1
 fi
@@ -113,69 +151,47 @@
 if [ $jok -eq 0 ] ; then
     echo
-    echo "The version of the Java Runtime Environment you have installed is too"
-    echo "old to run the Greenstone Librarian Interface. Please install a new"
-    echo "version of the JRE (version 1.4 or newer) and rerun this script."
-    exit 1
-fi
-
-## ---- Check WGet exists ----
-wgetpath=
-
-wok="NoWGet"
-
-# Commented out until after UNESCO release
-# Some users may set the above line manually
-#if [ "$wgetpath" == "" ]; then
-#    # Check if WGet is on the search path
-#    wgetpath=`which wget 2> /dev/null`
-#fi
-
-# Check that a WGet executable has been found
-#echo "Checking WGet: $wgetpath"
-#if [ ! -x "$wgetpath" ]; then
-#    echo
-#    echo "Failed to locate an appropriate version of WGet. Web mirroring will"
-#    echo "be disabled. Greenstone Librarian Interface requires WGet installed"
-#    echo "in order to fully access this feature."
-#else
-    ## -- Check the version of WGet is new enough (1.9 or higher) to run properly --
-#    wgetversion=`$wgetpath --version 2>&1 | sed -n 's/^GNU Wget \(.*\)/\1/p'`    
-#    wvmajor=`echo $wgetversion | sed -n 's/^\([0-9]*\).*$/\1/p'`
-#    wvminor=`echo $wgetversion | sed -n 's/^[0-9]*\.\(.*\)$/\1/p'`
-
-#    wok="WGet1.9"
-#    if [ $wvmajor -lt 1 ] ; then
-#	wok="<WGet1.9"
-#    fi
-#    if [ $wvmajor -eq 1 ] && [ $wvminor -lt 9 ] ; then
-#	wok="<WGet1.9"
-#    fi
-#    if [ $wok == "<WGet1.9" ] ; then
-#	echo
-#	echo "The version of the WGet you have installed has a known bug when"
-#	echo "mirroring files which contain encoded characters such as space and"
-#	echo "tilde in their URL. While this shouldn't be a problem, we recommend"
-#        echo "installing WGet 1.9 or higher."
-#    fi
-#fi
+    if [ "$glilang" == "ru" ]; then
+	echo "÷ÅÒÓÉÑ Java Runtime Environment, ËÏÔÏÒÕÀ ÷Ù ÕÓÔÁÎÏ×ÉÌÉ, ÏÞÅÎØ ÓÔÁÒÁ,"
+	echo "ÞÔÏÂÙ ÕÐÒÁ×ÌÑÔØ ÂÉÂÌÉÏÔÅÞÎÙÍ ÉÎÔÅÒÆÅÊÓÏÍ Greenstone. ðÏÖÁÌÕÊÓÔÁ, "
+	echo "ÕÓÔÁÎÏ×ÉÔÅ ÎÏ×ÕÀ ×ÅÒÓÉÀ JRE (×ÅÒÓÉÀ 1.4 ÉÌÉ ÂÏÌÅÅ ÎÏ×ÕÀ) É"
+	echo "ÐÅÒÅÕÓÔÁÎÏ×ÉÔÅ ÜÔÏÔ ÓËÒÉÐÔ"
+    else
+	echo "The version of the Java Runtime Environment you have installed is too"
+	echo "old to run the Greenstone Librarian Interface. Please install a new"
+	echo "version of the JRE (version 1.4 or newer) and rerun this script."
+    fi
+    exit 1
+fi
 
 ## ---- Check that the GLI has been compiled ----
 if [ ! -f "classes/org/greenstone/gatherer/Gatherer.class" ] && [ ! -f "GLI.jar" ]; then
     echo
-    echo "You need to compile the Greenstone Librarian Interface (using makegli.sh)"
-    echo "before running this script."
+    if [ "$glilang" == "ru" ]; then
+	echo "÷Ù ÄÏÌÖÎÙ ËÏÍÐÉÌÉÒÏ×ÁÔØ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone"
+	echo "(ÉÓÐÏÌØÚÕÑ makegli.sh) ÐÅÒÅÄ ××ÏÄÏÍ ÜÔÏÇÏ ÓËÒÉÐÔÁ"
+    else
+	echo "You need to compile the Greenstone Librarian Interface (using makegli.sh)"
+	echo "before running this script."
+    fi
     exit 1
 fi
 
 if [ "$1" == "-test" ]; then
-    echo "Testing class: $2"
-    echo "arguments $*"
+    if [ "$glilang" == "ru" ]; then
+    else
+	echo "Testing class: $2"
+	echo "arguments $*"
+    fi
     java -classpath classes/:GLI.jar:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar $2 $3
-    exit 1
+    exit 0
 fi
 
 ## ---- Finally, run the GLI ----
 echo
-echo "Running the Greenstone Librarian Interface..."
+if [ "$glilang" == "ru" ]; then
+    echo "ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone..."
+else
+    echo "Running the Greenstone Librarian Interface..."
+fi
 
 # Other arguments you can provide to GLI to work around memory limitations, or debug
@@ -189,3 +205,7 @@
 java -classpath classes/:GLI.jar:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar org.greenstone.gatherer.Gatherer -gsdl $GSDLHOME -wget $wok$wgetpath $*
 
-echo "Done!"
+if [ "$glilang" == "ru" ]; then
+    echo "÷ÙÐÏÌÎÅÎÏ!"
+else
+    echo "Done!"
+fi
