Index: trunk/gli/gli.sh
===================================================================
--- trunk/gli/gli.sh	(revision 12285)
+++ trunk/gli/gli.sh	(revision 12286)
@@ -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}/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,23 +49,21 @@
 
 # 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
 
     # If it is not set, assume that the GLI is installed as a subdirectory of Greenstone
     else
-	pushd .. > /dev/null
-	gsdlpath=`pwd`
-	popd > /dev/null
+	gsdlpath=`(cd .. && pwd)`
     fi
 fi
 
 # 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
@@ -74,12 +72,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, Á ÚÁÔÅÍ ××ÅÓÔÉ ÜÔÏÔ ÓËÒÉÐÔ ÓÎÏ×Á."
@@ -92,8 +90,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
 
@@ -103,5 +101,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`
@@ -109,9 +107,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
@@ -120,15 +118,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 ÎÅ ÂÙÌ × ×ÁÛÅÊ ÓÉÓÔÅÍÅ. ðÏÖÁÌÕÊÓÔÁ, ÐÏÄÔ×ÅÒÄÉÔÅ, ÞÔÏ "
@@ -148,8 +146,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"
 
@@ -161,9 +159,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
@@ -172,13 +170,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 ÉÌÉ ×ÙÛÅ)"
@@ -197,5 +195,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 "
@@ -203,10 +201,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. ðÏÖÁÌÕÊÓÔÁ, "
@@ -227,11 +225,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) ÐÅÒÅÄ ××ÏÄÏÍ ÜÔÏÇÏ ÓËÒÉÐÔÁ"
@@ -245,9 +243,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
@@ -275,9 +273,9 @@
   else
     echo
-    if [ "$glilang" == "es" ]; then
+    if [ "$glilang" = "es" ]; then
         echo "Restarting/Ejecutando la Interfaz de la Biblioteca Digital Greenstone..."
-    elif [ "$glilang" == "fr" ]; then
+    elif [ "$glilang" = "fr" ]; then
         echo "Restarting/Exécution de Greenstone Librarian Interface"
-    elif [ "$glilang" == "ru" ]; then
+    elif [ "$glilang" = "ru" ]; then
         echo "Restarting/ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone..."
     else
@@ -288,9 +286,9 @@
 done 
 
-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
