Index: other-projects/trunk/gs3-webservices-democlient/gs3democlient.sh
===================================================================
--- other-projects/trunk/gs3-webservices-democlient/gs3democlient.sh	(revision 15225)
+++ other-projects/trunk/gs3-webservices-democlient/gs3democlient.sh	(revision 15225)
@@ -0,0 +1,168 @@
+#!/bin/sh
+language=en
+
+echo
+if [ "$language" = "es" ]; then
+    echo "GS3 Web Services demo-client"
+    echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato"
+    echo "GS3 Web Services demo-client NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÍA."
+    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 [ "$language" = "fr" ]; then
+    echo "GS3 Web Services demo-client"
+    echo "Copyright (C) 2006, 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 [ "$language" = "ru" ]; then
+    echo "GS3 Web Services demo-client"
+    echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato"
+    echo "âéç ÎÅ ÄÁÅÔ áâóïìàôîï îéëáëéè çáòáîôéê; ÄÅÔÁÌÉ ÓÍ. × ÔÅËÓÔÅ LICENSE.TXT"
+    echo "üÔÏ - Ó×ÏÂÏÄÎÏ ÒÁÓÐÒÏÓÔÒÁÎÑÅÍÏÅ ÐÒÏÇÒÁÍÍÎÏÅ ÏÂÅÓÐÅÞÅÎÉÅ É ÷Ù ÍÏÖÅÔÅ ÒÁÓÐÒÏÓÔÒÁÎÑÔØ ÅÇÏ"
+else
+    echo "GS3 Web Services demo-client"
+    echo "Copyright (C) 2006, 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
+
+##  -------- Run the Greenstone Librarian Interface --------
+
+# This script must be run from within the directory in which it lives
+thisdir=`pwd`
+if [ ! -f "${thisdir}/gs3democlient.sh" ]; then
+    if [ "$language" = "es" ]; then
+        echo "Este guión deberá ejecutarse desde el directorio en el que reside."
+    elif [ "$language" = "fr" ]; then
+	echo "Ce script doit être exécuté à partir du répertoire dans lequel il se trouve."
+    elif [ "$language" = "ru" ]; then
+	echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ"
+    else
+	echo "This script must be run from the directory in which it resides."
+    fi
+    exit 1
+fi
+
+
+## ---- Check Java exists ----
+javapath=
+
+# Some users may set the above line manually
+if [ "x$javapath" = "x" ]; then
+
+    # If it is set, use the JAVA_HOME environment variable
+    if [ "x$JAVA_HOME" != "x" ]; then
+	javapath="$JAVA_HOME/bin/java"
+
+    # Check if Java is on the search path
+    else
+	javapath=`which java 2> /dev/null`
+    fi
+fi
+
+# Check that a Java executable has been found
+version="1.5"
+
+if [ "$language" = "es" ]; then
+    echo "Revisando Java: $javapath"
+elif [ "$language" = "fr" ]; then
+    echo "Vérification de Java: $javapath"
+elif [ "$language" = "ru" ]; then
+    echo "ðÒÏ×ÅÒËÁ Java: $javapath"
+else
+    echo "Checking Java: $javapath"
+fi
+if [ ! -x "$javapath" ]; then
+    echo
+    if [ "$language" = "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 GS3 Web Services demo-client."
+    elif [ "$language" = "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 $version"
+	echo "ou supérieur) avant de démarrer GS3 Web Services demo-client."
+    elif [ "$language" = "ru" ]; then
+	echo "îÅ ÕÄÁÌÏÓØ ÏÐÒÅÄÅÌÉÔØ ÍÅÓÔÏÎÁÈÏÖÄÅÎÉÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ×ÅÒÓÉÉ Java."
+	echo "÷Ù ÄÏÌÖÎÙ ÕÓÔÁÎÏ×ÉÔØ Java Runtime Environment (×ÅÒÓÉÀ $version ÉÌÉ"
+	echo "×ÙÛÅ) ÐÅÒÅÄ ××ÏÄÏÍ ÂÉÂÌÉÏÔÅÞÎÏÇÏ ÉÎÔÅÒÆÅÊÓÁ GS3 Web Services demo-client."
+    else
+	echo "Failed to locate an appropriate version of Java. You must install a"
+	echo "Java Runtime Environment (version $version or greater) before running the"
+	echo "GS3 Web Services demo-client."
+    fi
+    exit 1
+fi
+
+
+## -- Check the version of Java is new enough (1.5.0 or higher) to run the GS3democlient --
+`$javapath -classpath . CheckJavaVersion $version GS3democlient > /dev/null`
+if [ $? -ne 0 ] ; then
+    echo
+    if [ "$language" = "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"
+	echo "la GS3 Web Services demo-client. Por favor instale"
+	echo "una nueva versión del Ambiente de Ejecución Java (versión $version"
+	echo "o posterior) y ejecute nuevamente este guión."
+    elif [ "$language" = "fr" ]; then
+	echo "La version de Java Runtime Environment que vous avez installée est"
+	echo "trop vielle pour faire fonctionner GS3 Web Services demo-client."
+	echo "Veuillez installer une nouvelle version du JRE (version $version ou"
+	echo "plus récente) et redémarrez le script."
+    elif [ "$language" = "ru" ]; then
+	echo "÷ÅÒÓÉÑ Java Runtime Environment, ËÏÔÏÒÕÀ ÷Ù ÕÓÔÁÎÏ×ÉÌÉ, ÏÞÅÎØ ÓÔÁÒÁ,"
+	echo "ÞÔÏÂÙ ÕÐÒÁ×ÌÑÔØ ÂÉÂÌÉÏÔÅÞÎÙÍ ÉÎÔÅÒÆÅÊÓÏÍ Greenstone. ðÏÖÁÌÕÊÓÔÁ, "
+	echo "ÕÓÔÁÎÏ×ÉÔÅ ÎÏ×ÕÀ ×ÅÒÓÉÀ JRE (×ÅÒÓÉÀ $version ÉÌÉ ÂÏÌÅÅ ÎÏ×ÕÀ) É"
+	echo "ÐÅÒÅÕÓÔÁÎÏ×ÉÔÅ ÜÔÏÔ ÓËÒÉÐÔ"
+    else
+	echo "The version of the Java Runtime Environment you have installed is too"
+	echo "old to run the GS3 Web Services demo-client. Please install a new"
+	echo "version of the JRE (version $version or newer) and rerun this script."
+    fi
+    exit 1
+fi
+
+## ---- Check that the GS3democlient executable exists ----
+if [ ! -f "GS3democlient.jar" ]; then
+    echo
+    if [ "$language" = "es" ]; then
+	echo "Usted necesita compilar la GS3 Web Services demo-client"
+	echo "(por medio de ant build-demo-client) antes de ejecutar este guión."
+    elif [ "$language" = "fr" ]; then
+	echo "Vous devez compiler le GS3 Web Services demo-client (en utilisant"
+	echo "ant build-demo-client) avant d'exécuter ce script."
+    elif [ "$language" = "ru" ]; then
+	echo "÷Ù ÄÏÌÖÎÙ ËÏÍÐÉÌÉÒÏ×ÁÔØ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone"
+	echo "(ÉÓÐÏÌØÚÕÑ ant build-demo-client) ÐÅÒÅÄ ××ÏÄÏÍ ÜÔÏÇÏ ÓËÒÉÐÔÁ"
+    else
+	echo "You need to compile the GS3 Web Services demo-client (using"
+	echo "ant build-demo-client) before running this script."
+    fi
+    exit 1
+fi
+
+## ---- Finally, run the GS3democlient ----
+echo
+if [ "$language" = "es" ]; then
+    echo "Ejecutando la GS3 Web Services demo-client..."
+elif [ "$language" = "fr" ]; then
+    echo "Exécution de GS3 Web Services demo-client"
+elif [ "$language" = "ru" ]; then
+    echo "ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ GS3 Web Services demo-client..."
+else
+    echo "Running GS3 Web Services demo-client..."
+fi
+
+    $javapath -jar GS3democlient.jar 
+##$*
+ 
+if [ "$language" = "es" ]; then
+    echo "¡Hecho!"
+elif [ "$language" = "fr" ]; then
+    echo "Terminé!"
+elif [ "$language" = "ru" ]; then
+    echo "÷ÙÐÏÌÎÅÎÏ!"
+else
+    echo "Done!"
+fi
