Index: /greenstone3/trunk/admin/gs3-admin.bat
===================================================================
--- /greenstone3/trunk/admin/gs3-admin.bat	(revision 18109)
+++ /greenstone3/trunk/admin/gs3-admin.bat	(revision 18109)
@@ -0,0 +1,63 @@
+@echo off
+set GAILANG=en
+
+set PROGNAME=Greenstone Administrator Interface 
+set PROGABBR=GAI
+
+echo.
+if "%GLILANG%" == "en" echo %PROGNAME% (%PROGABBR%)
+if "%GLILANG%" == "en" echo Copyright (C) 2005, New Zealand Digital Library Project, University Of Waikato
+if "%GLILANG%" == "en" echo %PROGABBR% comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt
+if "%GLILANG%" == "en" echo This is free software, and you are welcome to redistribute it
+
+::  -------- Run the Greenstone Administrator Interface --------
+
+::  This script must be run from within the directory in which it lives
+if exist gs3-admin.bat goto setvars
+    if "%GAILANG%" == "en" echo This script must be run from the directory in which it resides.
+    if "%GAILANG%" == "es" echo Este gui¢n deber  ejecutarse desde el directorio en el que reside.
+    if "%GLILANG%" == "es" echo Este gui¢n deber  ejecutarse desde el directorio en el que reside.
+    if "%GLILANG%" == "fr" echo Ce script doit tre excut 
+ partir du rpertoire dans lequel il se trouve.
+    if "%GLILANG%" == "ru" echo â®â áªàš¯â €®«Š¥­ ¡ëâì ¢§ïâ š§ €šà¥ªâ®àšš, ¢ ª®â®à®© ®­ à á¯®«®Š¥­
+    goto exit
+
+
+::  ---- Determine GSDL3HOME ----
+:setvars
+set GSDL3PATH=
+
+:: Some users may set the above line manually, or it may be set as an argument
+if not "%GSDL3PATH%" == "" goto setgsdl3
+	:: Check the environment variable first
+	if not "%GSDL3SRCHOME%" == "" set GSDL3PATH=%GSDL3SRCHOME%
+	if not "%GSDL3SRCHOME%" == "" goto setgsdl3
+		echo **** I am HERE
+		if "%GSDL3SRCHOME%" == "" set GSDL3PATH="%CD%"
+
+:setgsdl3
+:: Setup Greenstone3, unless it has already been done
+if "%GSDL3HOME%" == "" call "%GSDL3PATH%\gs3-setup.bat" SetEnv > nul
+set GSDL3PATH=
+
+echo gsdl3srchome: %GSDL3SRCHOME%
+echo gsdl3srchome: %GSDL3HOME%
+echo javahome: %JAVA_HOME%
+echo classpath: %CLASSPATH%
+echo.
+
+:startup
+java -cp "%CLASSPATH%" org.greenstone.admin.GAI %GSDL3SRCHOME% %GSDL3HOME%
+
+:exit
+echo.
+pause
+
+:done
+:: ---- Clean up ----
+
+
+
+
+
+
Index: /greenstone3/trunk/admin/gs3-admin.sh
===================================================================
--- /greenstone3/trunk/admin/gs3-admin.sh	(revision 18109)
+++ /greenstone3/trunk/admin/gs3-admin.sh	(revision 18109)
@@ -0,0 +1,63 @@
+#!/bin/sh
+gailang=en
+
+echo
+    echo "Greenstone Administrator Interface (GAI)"
+    echo "Copyright (C) 2005, New Zealand Digital Library Project, University Of Waikato"
+    echo "GAI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt"
+    echo "This is free software, and you are welcome to redistribute it"
+echo
+
+##  -------- Run the Greenstone Administrator Interface --------
+
+# This script must be run from within the directory in which it lives
+thisdir=`pwd`
+if [ ! -f "${thisdir}/gs3-admin.sh" ]; then
+    if [ "$gailang" == "es" ]; then
+        echo "Este guión deberá ejecutarse desde el directorio en el que reside."
+    elif [ "$gailang" == "fr" ]; then
+	echo "Ce script doit être exécuté à partir du répertoire dans lequel il se trouve."
+    elif [ "$gailang" == "ru" ]; then
+	echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ"
+    else
+	echo "This script must be run from the directory in which it resides."
+    fi
+    exit 1
+fi
+
+
+##  ---- Determine GSDL3HOME ----
+gsdl3path=
+
+# Some users may set the above line manually
+if [ "$gsdl3path" == "" ]; then
+    # Check the environment variable first
+    if [ "$GSDL3SRCHOME" != "" ]; then
+	gsdl3path=$GSDL3SRCHOME
+
+    # If it is not set, assume that the GAI is installed as a subdirectory of Greenstone
+    else
+#	pushd .. > /dev/null
+	gsdl3path=`pwd`
+#	popd > /dev/null
+    fi
+fi
+
+# Setup Greenstone3, unless it has already been done
+if [ "$GSDL3HOME" == "" ]; then
+    pushd $gsdl3path > /dev/null
+    source gs3-setup.sh
+    popd > /dev/null
+fi
+
+# Other arguments you can provide to GLI to work around memory limitations, or debug
+# -Xms<number>M    To set minimum memory (by default 32MB)
+# -Xmx<number>M    To set maximum memory (by default the nearest 2^n to the total remaining physical memory)
+# -verbose:gc      To set garbage collection messages
+# -Xincgc          For incremental garbage collection (significantly slows performance)
+# -Xprof           Function call profiling
+# -Xloggc:<file>   Write garbage collection log
+
+# $javapath -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar:lib/mail.jar:lib/activation.jar org.greenstone.gatherer.GathererProg -gsdl $GSDLHOME -wget $wgetpath $*
+
+java -cp $CLASSPATH org.greenstone.admin.GAI $GSDL3SRCHOME $GSDL3HOME
