Index: /trunk/gli/clean.sh
===================================================================
--- /trunk/gli/clean.sh	(revision 12286)
+++ /trunk/gli/clean.sh	(revision 12287)
@@ -6,10 +6,10 @@
 ## ---- Remove class files ----
 echo
-if [ "$glilang" == "es" ]; then
+if [ "$glilang" = "es" ]; then
     echo "Eliminando los archivos de clase de la Interfaz de la Biblioteca "
     echo "Digital Greenstone..."
-elif [ "$glilang" == "fr" ]; then
+elif [ "$glilang" = "fr" ]; then
     echo "Suppression des fichiers de classe de Greenstone Librarian Interface"
-elif [ "$glilang" == "ru" ]; then
+elif [ "$glilang" = "ru" ]; then
     echo "õÄÁÌÅÎÉÅ ÆÁÊÌÏ× ËÌÁÓÓÁ ÂÉÂÌÉÏÔÅÞÎÏÇÏ ÉÎÔÅÒÆÅÊÓÁ Greenstone"
 else
@@ -20,9 +20,9 @@
 rm -rf classes/org/greenstone/gatherer/*
 
-if [ "$glilang" == "es" ]; then
+if [ "$glilang" = "es" ]; then
     echo "¡Hecho!"
-elif [ "$glilang" == "fr" ]; then
+elif [ "$glilang" = "fr" ]; then
     echo "Terminé!"
-elif [ "$glilang" == "ru" ]; then
+elif [ "$glilang" = "ru" ]; then
     echo "÷ÙÐÏÌÎÅÎÏ!"
 else
Index: /trunk/gli/client-gli.sh
===================================================================
--- /trunk/gli/client-gli.sh	(revision 12286)
+++ /trunk/gli/client-gli.sh	(revision 12287)
@@ -3,5 +3,5 @@
 
 echo
-if [ "$glilang" == "es" ]; then
+if [ "$glilang" = "es" ]; then
     echo "Interfaz de la Biblioteca Digital Greenstone (Greenstone Librarian Interface - GLI)"
     echo "Copyright (C) 2005, New Zealand Digital Library Project, University Of Waikato"
@@ -9,10 +9,10 @@
     echo "Para mayor información vea los términos de la licencia en LICENSE.txt"
     echo "Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita"
-elif [ "$glilang" == "fr" ]; then
+elif [ "$glilang" = "fr" ]; then
     echo "Interface du Bibliothécaire Greenstone (Greenstone Librarian Interface - GLI)"
     echo "Copyright (C) 2005, New Zealand Digital Library Project, University Of Waikato"
     echo "GLI est fourni sans AUCUNE GARANTIE; pour des détails, voir LICENSE.txt"
     echo "Ceci est un logiciel libre, et vous êtes invité à le redistribuer"
-elif [ "$glilang" == "ru" ]; then
+elif [ "$glilang" = "ru" ]; then
     echo "âÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone (Greenstone Librarian Interface - GLI)"
     echo "Copyright (C) 2005, New Zealand Digital Library Project, University Of Waikato"
@@ -32,9 +32,9 @@
 thisdir=`pwd`
 if [ ! -f "${thisdir}/client-gli.sh" ]; then
-    if [ "$glilang" == "es" ]; then
+    if [ "$glilang" = "es" ]; then
         echo "Este guión deberá ejecutarse desde el directorio en el que reside."
-    elif [ "$glilang" == "fr" ]; then
+    elif [ "$glilang" = "fr" ]; then
 	echo "Ce script doit être exécuté à partir du répertoire dans lequel il se trouve."
-    elif [ "$glilang" == "ru" ]; then
+    elif [ "$glilang" = "ru" ]; then
 	echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ"
     else
@@ -49,8 +49,8 @@
 
 # Some users may set the above line manually
-if [ "$javapath" == "" ]; then
+if [ "x$javapath" = "x" ]; then
 
     # If it is set, use the JAVA_HOME environment variable
-    if [ "$JAVA_HOME" != "" ]; then
+    if [ "x$JAVA_HOME" != "x" ]; then
 	javapath="$JAVA_HOME/bin/java"
 
@@ -62,9 +62,9 @@
 
 # Check that a Java executable has been found
-if [ "$glilang" == "es" ]; then
+if [ "$glilang" = "es" ]; then
     echo "Revisando Java: $javapath"
-elif [ "$glilang" == "fr" ]; then
+elif [ "$glilang" = "fr" ]; then
     echo "Vérification de Java: $javapath"
-elif [ "$glilang" == "ru" ]; then
+elif [ "$glilang" = "ru" ]; then
     echo "ðÒÏ×ÅÒËÁ Java: $javapath"
 else
@@ -73,13 +73,13 @@
 if [ ! -x "$javapath" ]; then
     echo
-    if [ "$glilang" == "es" ]; then
+    if [ "$glilang" = "es" ]; then
 	echo "No se pudo localizar una versión apropiada de Java. Usted deberá "
 	echo "instalar un Ambiente de Ejecución Java (versión 1.4 o superior) "
 	echo "antes de correr la Interfaz de la Biblioteca Digital Greenstone."
-    elif [ "$glilang" == "fr" ]; then
+    elif [ "$glilang" = "fr" ]; then
 	echo "Une version adéquate de Java n'a pas pu être localisée."
 	echo "Vous devez installer un Java Runtime Environment (version 1.4 ou"
 	echo "supérieur) avant de démarrer Greenstone Librarian Interface."
-    elif [ "$glilang" == "ru" ]; then
+    elif [ "$glilang" = "ru" ]; then
 	echo "îÅ ÕÄÁÌÏÓØ ÏÐÒÅÄÅÌÉÔØ ÍÅÓÔÏÎÁÈÏÖÄÅÎÉÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ×ÅÒÓÉÉ Java."
 	echo "÷Ù ÄÏÌÖÎÙ ÕÓÔÁÎÏ×ÉÔØ Java Runtime Environment (×ÅÒÓÉÀ 1.4 ÉÌÉ ×ÙÛÅ)"
@@ -98,5 +98,5 @@
 if [ $? -ne 2 ] ; then
     echo
-    if [ "$glilang" == "es" ]; then
+    if [ "$glilang" = "es" ]; then
 	echo "La versión del Ambiente de Ejecución Java (JRE por sus siglas en "
 	echo "inglés) que usted tiene instalada es demasiado vieja para ejecutar "
@@ -104,10 +104,10 @@
 	echo "una nueva versión del Ambiente de Ejecución Java (versión 1.4 o "
 	echo "posterior) y ejecute nuevamente este guión."
-    elif [ "$glilang" == "fr" ]; then
+    elif [ "$glilang" = "fr" ]; then
 	echo "La version de Java Runtime Environment que vous avez installée est"
 	echo "trop vielle pour faire fonctionner Greenstone Librarian Interface."
 	echo "Veuillez installer une nouvelle version du JRE (version 1.4 ou plus"
 	echo "récente) et redémarrez le script."
-    elif [ "$glilang" == "ru" ]; then
+    elif [ "$glilang" = "ru" ]; then
 	echo "÷ÅÒÓÉÑ Java Runtime Environment, ËÏÔÏÒÕÀ ÷Ù ÕÓÔÁÎÏ×ÉÌÉ, ÏÞÅÎØ ÓÔÁÒÁ,"
 	echo "ÞÔÏÂÙ ÕÐÒÁ×ÌÑÔØ ÂÉÂÌÉÏÔÅÞÎÙÍ ÉÎÔÅÒÆÅÊÓÏÍ Greenstone. ðÏÖÁÌÕÊÓÔÁ, "
@@ -125,11 +125,11 @@
 if [ ! -f "classes/org/greenstone/gatherer/GathererProg.class" ] && [ ! -f "GLI.jar" ]; then
     echo
-    if [ "$glilang" == "es" ]; then
+    if [ "$glilang" = "es" ]; then
 	echo "Usted necesita compilar la Interfaz de la Biblioteca Digital Greenstone"
 	echo "(por medio de makegli.sh) antes de ejecutar este guión."
-    elif [ "$glilang" == "fr" ]; then
+    elif [ "$glilang" = "fr" ]; then
 	echo "Vous devez compiler le Greenstone Interface (en utilisant makegli.sh)"
 	echo "avant d'exécuter ce script."
-    elif [ "$glilang" == "ru" ]; then
+    elif [ "$glilang" = "ru" ]; then
 	echo "÷Ù ÄÏÌÖÎÙ ËÏÍÐÉÌÉÒÏ×ÁÔØ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone"
 	echo "(ÉÓÐÏÌØÚÕÑ makegli.sh) ÐÅÒÅÄ ××ÏÄÏÍ ÜÔÏÇÏ ÓËÒÉÐÔÁ"
@@ -144,9 +144,9 @@
 ## ---- Finally, run the GLI ----
 echo
-if [ "$glilang" == "es" ]; then
+if [ "$glilang" = "es" ]; then
     echo "Ejecutando la Interfaz de la Biblioteca Digital Greenstone..."
-elif [ "$glilang" == "fr" ]; then
+elif [ "$glilang" = "fr" ]; then
     echo "Exécution de Greenstone Librarian Interface"
-elif [ "$glilang" == "ru" ]; then
+elif [ "$glilang" = "ru" ]; then
     echo "ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone..."
 else
@@ -164,9 +164,9 @@
 $javapath -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar org.greenstone.gatherer.GathererProg -use_remote_greenstone $*
 
-if [ "$glilang" == "es" ]; then
+if [ "$glilang" = "es" ]; then
     echo "¡Hecho!"
-elif [ "$glilang" == "fr" ]; then
+elif [ "$glilang" = "fr" ]; then
     echo "Terminé!"
-elif [ "$glilang" == "ru" ]; then
+elif [ "$glilang" = "ru" ]; then
     echo "÷ÙÐÏÌÎÅÎÏ!"
 else
Index: /trunk/gli/document.sh
===================================================================
--- /trunk/gli/document.sh	(revision 12286)
+++ /trunk/gli/document.sh	(revision 12287)
@@ -9,8 +9,8 @@
 
 # Some users may set the above line manually
-if [ "$javadocpath" == "" ]; then
+if [ "x$javadocpath" = "x" ]; then
 
     # If it is set, use the JAVA_HOME environment variable
-    if [ "$JAVA_HOME" != "" ]; then
+    if [ "x$JAVA_HOME" != "x" ]; then
 	javadocpath="$JAVA_HOME/bin/javadoc"
 
@@ -22,9 +22,9 @@
 
 # Check that a Javadoc executable has been found
-if [ "$glilang" == "es" ]; then
+if [ "$glilang" = "es" ]; then
     echo "Revisando Javadoc: $javadocpath"
-elif [ "$glilang" == "fr" ]; then
+elif [ "$glilang" = "fr" ]; then
     echo "Vérification de Javadoc: $javadocpath"
-elif [ "$glilang" == "ru" ]; then
+elif [ "$glilang" = "ru" ]; then
     echo "ðÒÏ×ÅÒËÁ Javadoc: $javadocpath"
 else
@@ -33,15 +33,15 @@
 if [ ! -x "$javadocpath" ]; then
     echo
-    if [ "$glilang" == "es" ]; then
+    if [ "$glilang" = "es" ]; then
 	echo "No se pudo localizar una versión apropiada de Javadoc. Usted deberá "
         echo "instalar un Kit de Desarrollo de Software Java (versión 1.4 o "
         echo "superior) antes de generar la documentación para la Interfaz de la "
         echo "Biblioteca Digital Greenstone."
-    elif [ "$glilang" == "fr" ]; then
+    elif [ "$glilang" = "fr" ]; then
 	echo "Une version appropriée de Javadoc n'a pas pu être localisée."
 	echo "Vous devez installer un Kit de Développement Java (version 1.4 ou"
 	echo "supérieure) avant de produire la documentation de Greenstone"
 	echo "Librarian Interface."
-    elif [ "$glilang" == "ru" ]; then
+    elif [ "$glilang" = "ru" ]; then
 	echo "îÅ ÕÄÁÌÏÓØ ÏÐÒÅÄÅÌÉÔØ ÍÅÓÔÏÎÁÈÏÖÄÅÎÉÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ×ÅÒÓÉÉ Javadoc."
 	echo "÷Ù ÄÏÌÖÎÙ ÉÎÓÔÁÌÌÉÒÏ×ÁÔØ Java Development Kit (×ÅÒÓÉÑ 1.4 ÉÌÉ ×ÙÛÅ) "
@@ -59,10 +59,10 @@
 ## ---- Document the GLI ----
 echo
-if [ "$glilang" == "es" ]; then
+if [ "$glilang" = "es" ]; then
     echo "Generando documentación para la Interfaz de la Biblioteca Digital"
     echo "Greenstone..."
-elif [ "$glilang" == "fr" ]; then
+elif [ "$glilang" = "fr" ]; then
     echo "Production de documentation pour la Greenstone Librarian Interface"
-elif [ "$glilang" == "ru" ]; then
+elif [ "$glilang" = "ru" ]; then
     echo "çÅÎÅÒÉÒÏ×ÁÎÉÅ ÄÏËÕÍÅÎÔÁÃÉÉ ÄÌÑ ÂÉÂÌÉÏÔÅÞÎÏÇÏ ÉÎÔÅÒÆÅÊÓÁ Greenstone"
 else
@@ -72,9 +72,9 @@
 javadoc -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar -sourcepath src/ -source 1.4 -author -breakiterator -d docs/ -group "Greenstone Librarian Interface" org.greenstone.gatherer:org.greenstone.gatherer.cdm:org.greenstone.gatherer.collection:org.greenstone.gatherer.feedback:org.greenstone.gatherer.file:org.greenstone.gatherer.gems:org.greenstone.gatherer.gui:org.greenstone.gatherer.gui.metaaudit:org.greenstone.gatherer.gui.tree:org.greenstone.gatherer.metadata:org.greenstone.gatherer.shell:org.greenstone.gatherer.util -private -splitindex -version   org.greenstone.gatherer org.greenstone.gatherer.cdm org.greenstone.gatherer.collection org.greenstone.gatherer.feedback org.greenstone.gatherer.file org.greenstone.gatherer.gems org.greenstone.gatherer.gui org.greenstone.gatherer.gui.metaaudit org.greenstone.gatherer.gui.tree org.greenstone.gatherer.metadata org.greenstone.gatherer.shell org.greenstone.gatherer.util
 
-if [ "$glilang" == "es" ]; then
+if [ "$glilang" = "es" ]; then
     echo "¡Hecho!"
-elif [ "$glilang" == "fr" ]; then
+elif [ "$glilang" = "fr" ]; then
     echo "Terminé!"
-elif [ "$glilang" == "ru" ]; then
+elif [ "$glilang" = "ru" ]; then
     echo "÷ÙÐÏÌÎÅÎÏ!"
 else
Index: /trunk/gli/gli4gs3.sh
===================================================================
--- /trunk/gli/gli4gs3.sh	(revision 12286)
+++ /trunk/gli/gli4gs3.sh	(revision 12287)
@@ -3,5 +3,5 @@
 
 echo
-if [ "$glilang" == "es" ]; then
+if [ "$glilang" = "es" ]; then
     echo "Interfaz de la Biblioteca Digital Greenstone (Greenstone Librarian Interface - GLI)"
     echo "Copyright (C) 2005, New Zealand Digital Library Project, University Of Waikato"
@@ -9,10 +9,10 @@
     echo "Para mayor información vea los términos de la licencia en LICENSE.txt"
     echo "Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita"
-elif [ "$glilang" == "fr" ]; then
+elif [ "$glilang" = "fr" ]; then
     echo "Interface du Bibliothécaire Greenstone (Greenstone Librarian Interface - GLI)"
     echo "Copyright (C) 2005, New Zealand Digital Library Project, University Of Waikato"
     echo "GLI est fourni sans AUCUNE GARANTIE; pour des détails, voir LICENSE.txt"
     echo "Ceci est un logiciel libre, et vous êtes invité à le redistribuer"
-elif [ "$glilang" == "ru" ]; then
+elif [ "$glilang" = "ru" ]; then
     echo "âÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone (Greenstone Librarian Interface - GLI)"
     echo "Copyright (C) 2005, New Zealand Digital Library Project, University Of Waikato"
@@ -32,9 +32,9 @@
 thisdir=`pwd`
 if [ ! -f "${thisdir}/gli4gs3.sh" ]; then
-    if [ "$glilang" == "es" ]; then
+    if [ "$glilang" = "es" ]; then
         echo "Este guión deberá ejecutarse desde el directorio en el que reside."
-    elif [ "$glilang" == "fr" ]; then
+    elif [ "$glilang" = "fr" ]; then
 	echo "Ce script doit être exécuté à partir du répertoire dans lequel il se trouve."
-    elif [ "$glilang" == "ru" ]; then
+    elif [ "$glilang" = "ru" ]; then
 	echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ"
     else
@@ -50,23 +50,21 @@
 
 # Some users may set the above line manually
-if [ "$gsdl3path" == "" ]; then
+if [ "x$gsdl3path" = "x" ]; then
     # Check the environment variable first
-    if [ "$GSDL3SRCHOME" != "" ]; then
+    if [ "x$GSDL3SRCHOME" != "x" ]; then
 	gsdl3path=$GSDL3SRCHOME
 
     # If it is not set, assume that the GLI is installed as a subdirectory of Greenstone 3
     else
-	pushd .. > /dev/null
-	gsdl3path=`pwd`
-	popd > /dev/null
+	gsdl3path=`(cd .. && pwd)`
     fi
 fi
 
 # Check that the Greenstone 3 installation looks OK
-if [ "$glilang" == "es" ]; then
+if [ "$glilang" = "es" ]; then
     echo "Revisando GSDL3: $gsdl3path"
-elif [ "$glilang" == "fr" ]; then
+elif [ "$glilang" = "fr" ]; then
     echo "Vérification de GSDL3: $gsdl3path"
-elif [ "$glilang" == "ru" ]; then
+elif [ "$glilang" = "ru" ]; then
     echo "ðÒÏ×ÅÒËÁ GSDL3: $gsdl3path"
 else
@@ -75,12 +73,12 @@
 if [ ! -f "${gsdl3path}/gs3-setup.sh" ] ; then
     echo
-    if [ "$glilang" == "es" ]; then
+    if [ "$glilang" = "es" ]; then
 	echo "No se pudo encontrar la instalación de Greenstone 3 o está incompleta."
         echo "Trate de reinstalar Greenstone 3 y a continuación ejecute nuevamente"
 	echo "este guión."
-    elif [ "$glilang" == "fr" ]; then
+    elif [ "$glilang" = "fr" ]; then
 	echo "L'installation de Greenstone 3 est introuvable ou incomplète."
 	echo "Essayez de réinstaller Greenstone 3 et exécutez ce script à nouveau."
-    elif [ "$glilang" == "ru" ]; then
+    elif [ "$glilang" = "ru" ]; then
 	echo "éÎÓÔÁÌÌÑÃÉÑ Greenstone 3 ÎÅ ÂÙÌÁ ÎÁÊÄÅÎÁ ÉÌÉ ÏÎÁ ÎÅÐÏÌÎÁ."
 	echo "ðÏÐÒÏÂÕÊÔÅ ÐÏ×ÔÏÒÎÏ ÕÓÔÁÎÏ×ÉÔØ Greenstone 3, Á ÚÁÔÅÍ ××ÅÓÔÉ ÜÔÏÔ ÓËÒÉÐÔ ÓÎÏ×Á."
@@ -93,8 +91,8 @@
 
 # Setup Greenstone 3, unless it has already been done
-if [ "$GSDL3HOME" == "" ] || [ "$GSDL3SRCHOME" == "" ]; then
-    pushd $gsdl3path > /dev/null
-    source gs3-setup.sh
-    popd > /dev/null
+if [ "x$GSDL3HOME" = "x" -o "x$GSDL3SRCHOME" = "x" ]; then
+    cd "$gsdl3path"
+    . gs3-setup.sh
+    cd "$thisdir"
 fi
 
@@ -105,7 +103,7 @@
 
 # Some users may set the above line manually
-if [ "$gsdlpath" == "" ]; then
+if [ "x$gsdlpath" = "x" ]; then
     # Check the environment variable first
-    if [ "$GSDLHOME" != "" ]; then
+    if [ "x$GSDLHOME" != "x" ]; then
 	gsdlpath=$GSDLHOME
 
@@ -117,9 +115,9 @@
 
 # Check that the Greenstone installation looks OK
-if [ "$glilang" == "es" ]; then
+if [ "$glilang" = "es" ]; then
     echo "Revisando GSDL: $gsdlpath"
-elif [ "$glilang" == "fr" ]; then
+elif [ "$glilang" = "fr" ]; then
     echo "Vérification de GSDL: $gsdlpath"
-elif [ "$glilang" == "ru" ]; then
+elif [ "$glilang" = "ru" ]; then
     echo "ðÒÏ×ÅÒËÁ GSDL: $gsdlpath"
 else
@@ -128,12 +126,12 @@
 if [ ! -f "${gsdlpath}/setup.bash" ] ; then
     echo
-    if [ "$glilang" == "es" ]; then
+    if [ "$glilang" = "es" ]; then
 	echo "No se pudo encontrar la instalación de Greenstone o está incompleta."
         echo "Trate de reinstalar Greenstone y a continuación ejecute nuevamente"
 	echo "este guión."
-    elif [ "$glilang" == "fr" ]; then
+    elif [ "$glilang" = "fr" ]; then
 	echo "L'installation de Greenstone est introuvable ou incomplète."
 	echo "Essayez de réinstaller Greenstone et exécutez ce script à nouveau."
-    elif [ "$glilang" == "ru" ]; then
+    elif [ "$glilang" = "ru" ]; then
 	echo "éÎÓÔÁÌÌÑÃÉÑ Greenstone ÎÅ ÂÙÌÁ ÎÁÊÄÅÎÁ ÉÌÉ ÏÎÁ ÎÅÐÏÌÎÁ."
 	echo "ðÏÐÒÏÂÕÊÔÅ ÐÏ×ÔÏÒÎÏ ÕÓÔÁÎÏ×ÉÔØ Greenstone, Á ÚÁÔÅÍ ××ÅÓÔÉ ÜÔÏÔ ÓËÒÉÐÔ ÓÎÏ×Á."
@@ -146,8 +144,8 @@
 
 # Setup Greenstone, unless it has already been done
-if [ "$GSDLHOME" == "" ]; then
-    pushd $gsdlpath > /dev/null
-    source setup.bash
-    popd > /dev/null
+if [ "x$GSDLHOME" = "x" ]; then
+    cd "$gsdlpath"
+    . setup.bash
+    cd "$thisdir"
 fi
 
@@ -157,5 +155,5 @@
 
 # Some users may set the above line manually
-if [ "$perlpath" == "" ]; then
+if [ "x$perlpath" = "x" ]; then
     # Check if Perl is on the search path
     perlpath=`which perl 2> /dev/null`
@@ -163,9 +161,9 @@
 
 # Check that a Perl executable has been found
-if [ "$glilang" == "es" ]; then
+if [ "$glilang" = "es" ]; then
     echo "Revisando Perl: $perlpath"
-elif [ "$glilang" == "fr" ]; then
+elif [ "$glilang" = "fr" ]; then
     echo "Vérification de Perl: $perlpath"
-elif [ "$glilang" == "ru" ]; then
+elif [ "$glilang" = "ru" ]; then
     echo "ðÒÏ×ÅÒËÁ Perl: $perlpath"
 else
@@ -174,15 +172,15 @@
 if [ ! -x "$perlpath" ] ; then
     echo
-    if [ "$glilang" == "es" ]; then
+    if [ "$glilang" = "es" ]; then
 	echo "La Interfaz de la Biblioteca Digital Greenstone requiere Perl para "
 	echo "poder operar, pero éste no aparece en su sistema. Por favor asegúrese "
 	echo "de que Perl está instalado y se encuentra en su ruta de búsqueda. A "
 	echo "continuación ejecute nuevamente este guión."
-    elif [ "$glilang" == "fr" ]; then
+    elif [ "$glilang" = "fr" ]; then
 	echo "Greenstone Librarian Interface nécessite perl pour son fonctionnement,"
 	echo "mais perl n'a pas pu être détecté dans votre système. Veuillez vous "
 	echo "assurer que perl est installé et est spécifié dans votre chemin de "
 	echo "recherche, puis redémarrez ce script."
-    elif [ "$glilang" == "ru" ]; then
+    elif [ "$glilang" = "ru" ]; then
 	echo "âÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone ÔÒÅÂÕÅÔ Perl, ÞÔÏÂÙ ÉÍÅÔØ ×ÏÚÍÏÖÎÏÓÔØ"
 	echo "ÒÁÂÏÔÁÔØ, ÎÏ Perl ÎÅ ÂÙÌ × ×ÁÛÅÊ ÓÉÓÔÅÍÅ. ðÏÖÁÌÕÊÓÔÁ, ÐÏÄÔ×ÅÒÄÉÔÅ, ÞÔÏ "
@@ -202,8 +200,8 @@
 
 # Some users may set the above line manually
-if [ "$javapath" == "" ]; then
+if [ "x$javapath" = "x" ]; then
 
     # If it is set, use the JAVA_HOME environment variable
-    if [ "$JAVA_HOME" != "" ]; then
+    if [ "x$JAVA_HOME" != "x" ]; then
 	javapath="$JAVA_HOME/bin/java"
 
@@ -215,9 +213,9 @@
 
 # Check that a Java executable has been found
-if [ "$glilang" == "es" ]; then
+if [ "$glilang" = "es" ]; then
     echo "Revisando Java: $javapath"
-elif [ "$glilang" == "fr" ]; then
+elif [ "$glilang" = "fr" ]; then
     echo "Vérification de Java: $javapath"
-elif [ "$glilang" == "ru" ]; then
+elif [ "$glilang" = "ru" ]; then
     echo "ðÒÏ×ÅÒËÁ Java: $javapath"
 else
@@ -226,13 +224,13 @@
 if [ ! -x "$javapath" ]; then
     echo
-    if [ "$glilang" == "es" ]; then
+    if [ "$glilang" = "es" ]; then
 	echo "No se pudo localizar una versión apropiada de Java. Usted deberá "
 	echo "instalar un Ambiente de Ejecución Java (versión 1.4 o superior) "
 	echo "antes de correr la Interfaz de la Biblioteca Digital Greenstone."
-    elif [ "$glilang" == "fr" ]; then
+    elif [ "$glilang" = "fr" ]; then
 	echo "Une version adéquate de Java n'a pas pu être localisée."
 	echo "Vous devez installer un Java Runtime Environment (version 1.4 ou"
 	echo "supérieur) avant de démarrer Greenstone Librarian Interface."
-    elif [ "$glilang" == "ru" ]; then
+    elif [ "$glilang" = "ru" ]; then
 	echo "îÅ ÕÄÁÌÏÓØ ÏÐÒÅÄÅÌÉÔØ ÍÅÓÔÏÎÁÈÏÖÄÅÎÉÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ×ÅÒÓÉÉ Java."
 	echo "÷Ù ÄÏÌÖÎÙ ÕÓÔÁÎÏ×ÉÔØ Java Runtime Environment (×ÅÒÓÉÀ 1.4 ÉÌÉ ×ÙÛÅ)"
@@ -251,5 +249,5 @@
 if [ $? -ne 2 ] ; then
     echo
-    if [ "$glilang" == "es" ]; then
+    if [ "$glilang" = "es" ]; then
 	echo "La versión del Ambiente de Ejecución Java (JRE por sus siglas en "
 	echo "inglés) que usted tiene instalada es demasiado vieja para ejecutar "
@@ -257,10 +255,10 @@
 	echo "una nueva versión del Ambiente de Ejecución Java (versión 1.4 o "
 	echo "posterior) y ejecute nuevamente este guión."
-    elif [ "$glilang" == "fr" ]; then
+    elif [ "$glilang" = "fr" ]; then
 	echo "La version de Java Runtime Environment que vous avez installée est"
 	echo "trop vielle pour faire fonctionner Greenstone Librarian Interface."
 	echo "Veuillez installer une nouvelle version du JRE (version 1.4 ou plus"
 	echo "récente) et redémarrez le script."
-    elif [ "$glilang" == "ru" ]; then
+    elif [ "$glilang" = "ru" ]; then
 	echo "÷ÅÒÓÉÑ Java Runtime Environment, ËÏÔÏÒÕÀ ÷Ù ÕÓÔÁÎÏ×ÉÌÉ, ÏÞÅÎØ ÓÔÁÒÁ,"
 	echo "ÞÔÏÂÙ ÕÐÒÁ×ÌÑÔØ ÂÉÂÌÉÏÔÅÞÎÙÍ ÉÎÔÅÒÆÅÊÓÏÍ Greenstone. ðÏÖÁÌÕÊÓÔÁ, "
@@ -281,11 +279,11 @@
 if [ ! -f "classes/org/greenstone/gatherer/GathererProg.class" ] && [ ! -f "GLI.jar" ]; then
     echo
-    if [ "$glilang" == "es" ]; then
+    if [ "$glilang" = "es" ]; then
 	echo "Usted necesita compilar la Interfaz de la Biblioteca Digital Greenstone"
 	echo "(por medio de makegli.sh) antes de ejecutar este guión."
-    elif [ "$glilang" == "fr" ]; then
+    elif [ "$glilang" = "fr" ]; then
 	echo "Vous devez compiler le Greenstone Interface (en utilisant makegli.sh)"
 	echo "avant d'exécuter ce script."
-    elif [ "$glilang" == "ru" ]; then
+    elif [ "$glilang" = "ru" ]; then
 	echo "÷Ù ÄÏÌÖÎÙ ËÏÍÐÉÌÉÒÏ×ÁÔØ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone"
 	echo "(ÉÓÐÏÌØÚÕÑ makegli.sh) ÐÅÒÅÄ ××ÏÄÏÍ ÜÔÏÇÏ ÓËÒÉÐÔÁ"
@@ -297,33 +295,18 @@
 fi
 
-if [ "$1" == "-test" ]; then
-    if [ "$glilang" == "es" ]; then
-	echo "Clase de prueba: $2"
-	echo "Argumentos $*"
-    elif [ "$glilang" == "fr" ]; then
-	echo "Classe de test: $2"
-	echo "Arguments $*"
-    elif [ "$glilang" == "ru" ]; then
-	echo "éÓÐÙÔÁÔÅÌØÎÙÊ ËÌÁÓÓ: $2"
-	echo "ðÁÒÁÍÅÔÒÙ $*"
-    else
-	echo "Testing class: $2"
-	echo "Arguments $*"
-    fi
-    $javapath -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar $2 $3
-    exit 0
-fi
-
 ## ---- Finally, run the GLI ----
 echo
-if [ "$glilang" == "es" ]; then
+if [ "$glilang" = "es" ]; then
     echo "Ejecutando la Interfaz de la Biblioteca Digital Greenstone..."
-elif [ "$glilang" == "fr" ]; then
+elif [ "$glilang" = "fr" ]; then
     echo "Exécution de Greenstone Librarian Interface"
-elif [ "$glilang" == "ru" ]; then
+elif [ "$glilang" = "ru" ]; then
     echo "ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone..."
 else
     echo "Running the Greenstone Librarian Interface..."
 fi
+
+stop_gli=0
+while [ "$stop_gli" = "0" ] ; do 
 
 # Other arguments you can provide to GLI to work around memory limitations, or debug
@@ -335,11 +318,29 @@
 # -Xloggc:<file>   Write garbage collection log
 
-$javapath -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl $GSDLHOME -gsdl3 $GSDL3HOME -gsdl3src $GSDL3SRCHOME -wget $wgetpath $*
-
-if [ "$glilang" == "es" ]; then
+    $javapath -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl $GSDLHOME -gsdl3 $GSDL3HOME -gsdl3src $GSDL3SRCHOME -wget $wgetpath $*
+    exit_status=$?
+
+  if [ "$exit_status" != "2" ] ; then
+    stop_gli=1
+  else
+    echo
+    if [ "$glilang" = "es" ]; then
+        echo "Restarting/Ejecutando la Interfaz de la Biblioteca Digital Greenstone..."
+    elif [ "$glilang" = "fr" ]; then
+        echo "Restarting/Exécution de Greenstone Librarian Interface"
+    elif [ "$glilang" = "ru" ]; then
+        echo "Restarting/ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone..."
+    else
+        echo "Restarting the Greenstone Librarian Interface..."
+    fi
+
+  fi
+done 
+
+if [ "$glilang" = "es" ]; then
     echo "¡Hecho!"
-elif [ "$glilang" == "fr" ]; then
+elif [ "$glilang" = "fr" ]; then
     echo "Terminé!"
-elif [ "$glilang" == "ru" ]; then
+elif [ "$glilang" = "ru" ]; then
     echo "÷ÙÐÏÌÎÅÎÏ!"
 else
Index: /trunk/gli/makegli.sh
===================================================================
--- /trunk/gli/makegli.sh	(revision 12286)
+++ /trunk/gli/makegli.sh	(revision 12287)
@@ -3,5 +3,5 @@
 
 echo
-if [ "$glilang" == "es" ]; then
+if [ "$glilang" = "es" ]; then
     echo "Interfaz de la Biblioteca Digital Greenstone (Greenstone Librarian Interface - GLI)"
     echo "Copyright (C) 2005, New Zealand Digital Library Project, University Of Waikato"
@@ -9,10 +9,10 @@
     echo "Para mayor información vea los términos de la licencia en LICENSE.txt"
     echo "Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita"
-elif [ "$glilang" == "fr" ]; then
+elif [ "$glilang" = "fr" ]; then
     echo "Interface du Bibliothécaire Greenstone (Greenstone Librarian Interface - GLI)"
     echo "Copyright (C) 2005, New Zealand Digital Library Project, University Of Waikato"
     echo "GLI est fourni sans AUCUNE GARANTIE; pour des détails, voir LICENSE.txt"
     echo "Ceci est un logiciel libre, et vous êtes invité à le redistribuer"
-elif [ "$glilang" == "ru" ]; then
+elif [ "$glilang" = "ru" ]; then
     echo "âÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone (Greenstone Librarian Interface - GLI)"
     echo "Copyright (C) 2005, New Zealand Digital Library Project, University Of Waikato"
@@ -33,8 +33,8 @@
 
 # Some users may set the above line manually
-if [ "$javacpath" == "" ]; then
+if [ "x$javacpath" = "x" ]; then
 
     # If it is set, use the JAVA_HOME environment variable
-    if [ "$JAVA_HOME" != "" ]; then
+    if [ "x$JAVA_HOME" != "x" ]; then
 	javacpath="$JAVA_HOME/bin/javac"
 
@@ -46,9 +46,9 @@
 
 # Check that a Javac executable has been found
-if [ "$glilang" == "es" ]; then
+if [ "$glilang" = "es" ]; then
     echo "Revisando Javac: $javacpath"
-elif [ "$glilang" == "fr" ]; then
+elif [ "$glilang" = "fr" ]; then
     echo "Vérification de Javac: $javacpath"
-elif [ "$glilang" == "ru" ]; then
+elif [ "$glilang" = "ru" ]; then
     echo "ðÒÏ×ÅÒËÁ Javac: $javacpath"
 else
@@ -57,14 +57,14 @@
 if [ ! -x "$javacpath" ]; then
     echo
-    if [ "$glilang" == "es" ]; then
+    if [ "$glilang" = "es" ]; then
 	echo "No se pudo localizar una versión apropiada de Javac."
 	echo "Por favor instale una nueva versión del Kit de Desarrollo de"
 	echo "Software Java (versión 1.4 o posterior) y ejecute nuevamente"
 	echo "este guión."
-    elif [ "$glilang" == "fr" ]; then
+    elif [ "$glilang" = "fr" ]; then
 	echo "Une version appropriée de Javac n'a pas pu être localisée."
 	echo "Veuillez installer une nouvelle version de Java SDK (version 1.4 ou"
 	echo "plus récente) et redémarrez ce script."
-    elif [ "$glilang" == "ru" ]; then
+    elif [ "$glilang" = "ru" ]; then
 	echo "îÅ ÕÄÁÌÏÓØ ÏÐÒÅÄÅÌÉÔØ ÍÅÓÔÏÎÁÈÏÖÄÅÎÉÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ×ÅÒÓÉÉ Javac."
 	echo "ðÏÖÁÌÕÊÓÔÁ, ÕÓÔÁÎÏ×ÉÔÅ ÎÏ×ÕÀ ×ÅÒÓÉÀ Java SDK (×ÅÒÓÉÀ 1.4 ÉÌÉ ÂÏÌÅÅ"
@@ -83,9 +83,9 @@
 if [ ! "x$*" = "x" ] ; then
     echo
-    if [ "$glilang" == "es" ]; then
+    if [ "$glilang" = "es" ]; then
 	echo "Compilando $* y clases dependientes..."
-    elif [ "$glilang" == "fr" ]; then
+    elif [ "$glilang" = "fr" ]; then
 	echo "Compilation de $* et des classes dépendantes,,,"
-    elif [ "$glilang" == "ru" ]; then
+    elif [ "$glilang" = "ru" ]; then
 	echo "ëÏÍÐÉÌÉÒÏ×ÁÎÉÅ $* É ÚÁ×ÉÓÉÍÙÅ ËÌÁÓÓÙ..."
     else
@@ -95,9 +95,9 @@
     $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/qfslib.jar $*
 
-    if [ "$glilang" == "es" ]; then
+    if [ "$glilang" = "es" ]; then
 	echo "¡Hecho!"
-    elif [ "$glilang" == "fr" ]; then
+    elif [ "$glilang" = "fr" ]; then
 	echo "Terminé!"
-    elif [ "$glilang" == "ru" ]; then
+    elif [ "$glilang" = "ru" ]; then
 	echo "÷ÙÐÏÌÎÅÎÏ!"
     else
@@ -112,9 +112,9 @@
 ./clean.sh
 
-if [ "$glilang" == "es" ]; then
+if [ "$glilang" = "es" ]; then
     echo "Compilando la Interfaz de la Biblioteca Digital Greenstone..."
-elif [ "$glilang" == "fr" ]; then
+elif [ "$glilang" = "fr" ]; then
     echo "Compilation de Greenstone Librarian Interface,,,"
-elif [ "$glilang" == "ru" ]; then
+elif [ "$glilang" = "ru" ]; then
     echo "ëÏÍÐÉÌÉÒÏ×ÁÎÉÅ ÂÉÂÌÉÏÔÅÞÎÏÇÏ ÉÎÔÅÒÆÅÊÓÁ Greenstone..."
 else
@@ -132,9 +132,9 @@
 $javacpath -deprecation -d classes/ -sourcepath src/ -classpath classes/:lib/apache.jar:lib/qfslib.jar src/org/greenstone/gatherer/util/Unzip.java
 
-if [ "$glilang" == "es" ]; then
+if [ "$glilang" = "es" ]; then
     echo "¡Hecho!"
-elif [ "$glilang" == "fr" ]; then
+elif [ "$glilang" = "fr" ]; then
     echo "Terminé!"
-elif [ "$glilang" == "ru" ]; then
+elif [ "$glilang" = "ru" ]; then
     echo "÷ÙÐÏÌÎÅÎÏ!"
 else
Index: /trunk/gli/makejar.sh
===================================================================
--- /trunk/gli/makejar.sh	(revision 12286)
+++ /trunk/gli/makejar.sh	(revision 12287)
@@ -6,9 +6,9 @@
 thisdir=`pwd`
 if [ ! -f "${thisdir}/makejar.sh" ]; then
-    if [ "$glilang" == "es" ]; then
+    if [ "$glilang" = "es" ]; then
         echo "Este guión deberá ejecutarse desde el directorio en el que reside."
-    elif [ "$glilang" == "fr" ]; then
+    elif [ "$glilang" = "fr" ]; then
 	echo "Ce script doit être exécuté à partir du répertoire dans lequel il se trouve."
-    elif [ "$glilang" == "ru" ]; then
+    elif [ "$glilang" = "ru" ]; then
 	echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ"
     else
@@ -21,11 +21,11 @@
 if [ ! -f "classes/org/greenstone/gatherer/GathererProg.class" ]; then
     echo
-    if [ "$glilang" == "es" ]; then
+    if [ "$glilang" = "es" ]; then
 	echo "Usted necesita compilar la Interfaz de la Biblioteca Digital Greenstone"
 	echo "(por medio de makegli.sh) antes de ejecutar este guión."
-    elif [ "$glilang" == "fr" ]; then
+    elif [ "$glilang" = "fr" ]; then
 	echo "Vous devez compiler le Greenstone Interface (en utilisant makegli.sh)"
 	echo "avant d'exécuter ce script."
-    elif [ "$glilang" == "ru" ]; then
+    elif [ "$glilang" = "ru" ]; then
 	echo "÷Ù ÄÏÌÖÎÙ ËÏÍÐÉÌÉÒÏ×ÁÔØ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone"
 	echo "(ÉÓÐÏÌØÚÕÑ makegli.sh) ÐÅÒÅÄ ××ÏÄÏÍ ÜÔÏÇÏ ÓËÒÉÐÔÁ"
@@ -80,5 +80,5 @@
 
 # ---- Make signed JAR file for the applet, if desired ----
-if [ "$1" == "-sign" ]; then
+if [ "$1" = "-sign" ]; then
     rm -f SignedGatherer.jar
     echo "greenstone" | jarsigner -keystore .greenstonestore -signedjar SignedGatherer.jar GLI.jar privateKey 2> /dev/null
