Changeset 18351 for gli/branches/rtl-gli/gli.sh
- Timestamp:
- 2009-01-12T11:04:15+13:00 (15 years ago)
- Location:
- gli/branches/rtl-gli
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/branches/rtl-gli
-
Property svn:ignore
set to
jar
GLIServer.jar
GLI.jar
-
Property svn:ignore
set to
-
gli/branches/rtl-gli/gli.sh
r13251 r18351 1 1 #!/bin/sh 2 3 # Function that, when given gsdlpath as parameter, will return the 4 # version of greenstone that is to run (2 or 3). If things are not, 5 # this program will exit here. 6 get_version() { 7 # first parameter is value of gsdlpath 8 if [ -f "${1}/gs3-setup.sh" ]; then 9 return 3 10 elif [ -f "${1}/setup.bash" ]; then 11 return 2 12 else 13 echo "Error: can't determine which Greenstone version is being run." 14 exit 1 15 fi 16 } 17 18 # Function that is passed the following paramters (in order): 19 # - the gsdlpath (GS3 home, GS2 home or gs2build for GS3), 20 # - the version of greenstone that's running, and 21 # - the language GLI is set to 22 # and checks the installation. 23 # If things are not right, this program will exit here. 24 check_installation() { 25 # Check that the Greenstone installation looks OK 26 if [ "$3" = "es" ]; then 27 echo "Revisando GSDL$2: $1" 28 elif [ "$3" = "fr" ]; then 29 echo "Vérification de GSDL$2: $1" 30 elif [ "$3" = "ru" ]; then 31 echo "ðÒÏ×ÅÒËÁ GSDL$2: $1" 32 else 33 echo "Checking GSDL$2: $1" 34 fi 35 # even if we are only checking for gs2build (gsdl2path), we still 36 # need the file setup.bash to exist in the following condition: 37 if [ ! -f "${1}/gs3-setup.sh" -a ! -f "${1}/setup.bash" ] ; then 38 echo 39 if [ "$3" = "es" ]; then 40 echo "No se pudo encontrar la instalación de Greenstone $2 o está incompleta." 41 echo "Trate de reinstalar Greenstone $2 y a continuación ejecute nuevamente" 42 echo "este guión." 43 elif [ "$3" = "fr" ]; then 44 echo "L'installation de Greenstone $2 est introuvable ou incomplète." 45 echo "Essayez de réinstaller Greenstone $2 et exécutez ce script à nouveau." 46 elif [ "$3" = "ru" ]; then 47 echo "éÎÓÔÁÌÌÑÃÉÑ Greenstone $_version ÎÅ ÂÙÌÁ ÎÁÊÄÅÎÁ ÉÌÉ ÏÎÁ ÎÅÐÏÌÎÁ." 48 echo "ðÏÐÒÏÂÕÊÔÅ ÐÏ×ÔÏÒÎÏ ÕÓÔÁÎÏ×ÉÔØ Greenstone $2, Á ÚÁÔÅÍ ××ÅÓÔÉ ÜÔÏÔ ÓËÒÉÐÔ ÓÎÏ×Á." 49 else 50 echo "The Greenstone $2 installation could not be found, or is incomplete." 51 echo "Try reinstalling Greenstone $2 then running this script again." 52 fi 53 exit 1 54 fi 55 } 56 2 57 glilang=en 3 58 59 if [ "x$PROGNAME" = "x" ] ; then 60 if [ "$glilang" = "es" ]; then 61 PROGNAME="Biblioteca Digital Greenstone" 62 elif [ "$glilang" = "fr" ]; then 63 PROGNAME="Bibliothécaire Greenstone" 64 elif [ "$glilang" = "ru" ]; then 65 PROGNAME="ÉÎÔÅÒÆÅÊÓ Greenstone" 66 else 67 PROGNAME="Greenstone Librarian Interface" 68 fi 69 fi 70 71 if [ "x$PROGABBR" = "x" ] ; then 72 PROGABBR="GLI" 73 fi 74 75 if [ "x$PROGNAME_EN" = "x" ] ; then 76 PROGNAME_EN="Greenstone Librarian Interface" 77 fi 78 4 79 echo 5 80 if [ "$glilang" = "es" ]; then 6 echo "Interfaz de la Biblioteca Digital Greenstone (Greenstone Librarian Interface - GLI)"81 echo "Interfaz de la $PROGNAME ($PROGNAME_EN - $PROGABBR)" 7 82 echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 8 echo "La Interfaz de la Biblioteca Digital GreenstoneNO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÍA."83 echo "La Interfaz de la $PROGNAME NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÍA." 9 84 echo "Para mayor información vea los términos de la licencia en LICENSE.txt" 10 85 echo "Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita" 11 86 elif [ "$glilang" = "fr" ]; then 12 echo "Interface du Bibliothécaire Greenstone (Greenstone Librarian Interface - GLI)"87 echo "Interface du $PROGNAME ($PROGNAME_EN - $PROGABBR)" 13 88 echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 14 echo " GLIest fourni sans AUCUNE GARANTIE; pour des détails, voir LICENSE.txt"89 echo "$PROGABBR est fourni sans AUCUNE GARANTIE; pour des détails, voir LICENSE.txt" 15 90 echo "Ceci est un logiciel libre, et vous êtes invité à le redistribuer" 16 91 elif [ "$glilang" = "ru" ]; then 17 echo "âÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone (Greenstone Librarian Interface - GLI)"92 echo "âÉÂÌÉÏÔÅÞÎÙÊ $PROGNAME ($PROGNAME_EN - $PROGABBR)" 18 93 echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 19 94 echo "âéç ÎÅ ÄÁÅÔ áâóïìàôîï îéëáëéè çáòáîôéê; ÄÅÔÁÌÉ ÓÍ. × ÔÅËÓÔÅ LICENSE.TXT" 20 95 echo "üÔÏ - Ó×ÏÂÏÄÎÏ ÒÁÓÐÒÏÓÔÒÁÎÑÅÍÏÅ ÐÒÏÇÒÁÍÍÎÏÅ ÏÂÅÓÐÅÞÅÎÉÅ É ÷Ù ÍÏÖÅÔÅ ÒÁÓÐÒÏÓÔÒÁÎÑÔØ ÅÇÏ" 21 96 else 22 echo " Greenstone Librarian Interface (GLI)"97 echo "$PROGNAME ($PROGABBR)" 23 98 echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 24 echo " GLIcomes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt"99 echo "$PROGABBR comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt" 25 100 echo "This is free software, and you are welcome to redistribute it" 26 101 fi … … 35 110 echo "Este guión deberá ejecutarse desde el directorio en el que reside." 36 111 elif [ "$glilang" = "fr" ]; then 37 112 echo "Ce script doit être exécuté à partir du répertoire dans lequel il se trouve." 38 113 elif [ "$glilang" = "ru" ]; then 39 40 else 41 114 echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ" 115 else 116 echo "This script must be run from the directory in which it resides." 42 117 fi 43 118 exit 1 … … 46 121 47 122 ## ---- Determine GSDLHOME ---- 123 ## gsdlpath can be either Greenstone 3 or Greenstone 2 48 124 gsdlpath= 49 50 125 # Some users may set the above line manually 51 if [ "x$gsdlpath" = "x" ]; then 126 127 128 # This variable is set automatically: 129 _version= 130 if [ "x$gsdlpath" != "x" ]; then 131 get_version $gsdlpath 132 _version=$? 133 # otherwise $gsdlpath is not yet set 134 else 52 135 # Check the environment variable first 136 # Check whether environment variables for both GS2 and GS3 are set 137 # and if so, warn the user that we have defaulted to GS3 138 if [ "x$GSDLHOME" != "x" -a "x$GSDL3SRCHOME" != "x" ]; then 139 # _version not set, but both env vars set, so default to 3 140 _version=3 141 gsdlpath=$GSDL3SRCHOME 142 echo "Both Greenstone 2 and Greenstone 3 environments are set." 143 echo "It is assumed you want to run Greenstone 3." 144 echo "If you want to run Greenstone 2, please unset the" 145 echo "environment variable GSDL3SRCHOME before running GLI." 146 echo "" 147 elif [ "x$GSDL3SRCHOME" != "x" ]; then 148 echo "Only gsdl3srchome set" 149 gsdlpath=$GSDL3SRCHOME 150 _version=3 151 echo "$gsdlpath" 152 elif [ "x$GSDLHOME" != "x" ]; then 153 gsdlpath=$GSDLHOME 154 _version=2 155 # If it is not set, assume that the GLI is installed as a subdirectory of Greenstone 156 else 157 gsdlpath=`(cd .. && pwd)` 158 # Still need to find what version we are running: 159 # GS3 main directory contains file gs3-setup.sh, GS2 only setup.bash 160 get_version $gsdlpath 161 _version=$? 162 fi 163 fi 164 165 echo "Greenstone version found: $_version" 166 167 # Check that the main Greenstone installation for the version we're running looks OK 168 check_installation $gsdlpath $_version $glilang 169 170 171 # Need to source the correct setup file depending on whether we are running 172 # gs3 or gs2 173 # If we're running version GS2 174 if [ "$_version" -eq 2 ]; then 175 # Setup Greenstone 2, unless it has already been done 176 if [ "x$GSDLHOME" = "x" ]; then 177 cd "$gsdlpath" 178 . ./setup.bash 179 cd "$thisdir" 180 fi 181 # else, if we're running GS3 182 elif [ "$_version" -eq 3 ]; then 183 # Setup Greenstone 3, unless it has already been done 184 if [ "x$GSDL3HOME" = "x" -o "x$GSDL3SRCHOME" = "x" ]; then 185 cd "$gsdlpath" 186 . ./gs3-setup.sh 187 cd "$thisdir" 188 fi 189 190 ## if Greenstone version 3 is running, we want to set gsdl2path 191 ## ---- Determine GSDLHOME ---- 192 ## may be already set, or manually entered here. 193 gsdl2path= 194 195 # Some users may set the above line manually 196 if [ "x$gsdl2path" = "x" ]; then 197 # Check the environment variable first 53 198 if [ "x$GSDLHOME" != "x" ]; then 54 gsdlpath=$GSDLHOME 55 56 # If it is not set, assume that the GLI is installed as a subdirectory of Greenstone 57 else 58 gsdlpath=`(cd .. && pwd)` 59 fi 60 fi 61 62 # Check that the Greenstone installation looks OK 63 if [ "$glilang" = "es" ]; then 64 echo "Revisando GSDL: $gsdlpath" 65 elif [ "$glilang" = "fr" ]; then 66 echo "Vérification de GSDL: $gsdlpath" 67 elif [ "$glilang" = "ru" ]; then 68 echo "ðÒÏ×ÅÒËÁ GSDL: $gsdlpath" 69 else 70 echo "Checking GSDL: $gsdlpath" 71 fi 72 if [ ! -f "${gsdlpath}/setup.bash" ] ; then 73 echo 74 if [ "$glilang" = "es" ]; then 75 echo "No se pudo encontrar la instalación de Greenstone o está incompleta." 76 echo "Trate de reinstalar Greenstone y a continuación ejecute nuevamente" 77 echo "este guión." 78 elif [ "$glilang" = "fr" ]; then 79 echo "L'installation de Greenstone est introuvable ou incomplète." 80 echo "Essayez de réinstaller Greenstone et exécutez ce script à nouveau." 81 elif [ "$glilang" = "ru" ]; then 82 echo "éÎÓÔÁÌÌÑÃÉÑ Greenstone ÎÅ ÂÙÌÁ ÎÁÊÄÅÎÁ ÉÌÉ ÏÎÁ ÎÅÐÏÌÎÁ." 83 echo "ðÏÐÒÏÂÕÊÔÅ ÐÏ×ÔÏÒÎÏ ÕÓÔÁÎÏ×ÉÔØ Greenstone, Á ÚÁÔÅÍ ××ÅÓÔÉ ÜÔÏÔ ÓËÒÉÐÔ ÓÎÏ×Á." 84 else 85 echo "The Greenstone installation could not be found, or is incomplete." 86 echo "Try reinstalling Greenstone then running this script again." 87 fi 88 exit 1 89 fi 90 91 # Setup Greenstone, unless it has already been done 92 if [ "x$GSDLHOME" = "x" ]; then 93 cd "$gsdlpath" 94 . setup.bash 199 echo "GSDLHOME environment variable is set to $GSDLHOME." 200 echo "Will use this to find build scripts." 201 gsdl2path=$GSDLHOME 202 # If it is not set, assume that the gs2build subdirectory of Greenstone 3 exists 203 else 204 gsdl2path=$GSDL3SRCHOME/gs2build 205 fi 206 fi 207 # Check that Greenstone 3's Greenstone 2 stuff looks OK (in gs2build) 208 check_installation $gsdl2path "" $glilang 209 210 # Setup Greenstone 3's gs2build, unless it has already been done 211 if [ "x$GSDLHOME" = "x" ]; then 212 cd "$gsdl2path" 213 . ./setup.bash 95 214 cd "$thisdir" 96 fi 97 215 fi 216 217 else 218 echo "Greenstone version unknown." 219 exit 1 220 fi 221 222 echo 223 if [ "x$GSDL3SRCHOME" != "x" ]; then 224 echo "GSDL3SRCHOME is: $GSDL3SRCHOME" 225 fi 226 if [ "x$GSDL3HOME" != "x" ]; then 227 echo "GSDL3HOME is: $GSDL3HOME" 228 fi 229 if [ "x$GSDLHOME" != "x" ]; then 230 echo "GSDLHOME is: $GSDLHOME" 231 fi 232 echo 98 233 99 234 ## ---- Check Perl exists ---- … … 107 242 108 243 # Check that a Perl executable has been found 109 if [ "$glilang" = "es" ]; then 110 echo "Revisando Perl: $perlpath" 111 elif [ "$glilang" = "fr" ]; then 112 echo "Vérification de Perl: $perlpath" 113 elif [ "$glilang" = "ru" ]; then 114 echo "ðÒÏ×ÅÒËÁ Perl: $perlpath" 115 else 116 echo "Checking Perl: $perlpath" 117 fi 244 echo "Perl:" 118 245 if [ ! -x "$perlpath" ] ; then 119 246 echo 120 247 if [ "$glilang" = "es" ]; then 121 echo "La Interfaz de la Biblioteca Digital Greenstonerequiere Perl para "122 123 124 248 echo "La Interfaz de la $PROGNAME requiere Perl para " 249 echo "poder operar, pero éste no aparece en su sistema. Por favor asegúrese " 250 echo "de que Perl está instalado y se encuentra en su ruta de búsqueda. A " 251 echo "continuación ejecute nuevamente este guión." 125 252 elif [ "$glilang" = "fr" ]; then 126 echo "Greenstone Librarian Interface nécessite perl pour son fonctionnement,"127 128 129 253 echo "$PROGNAME nécessite Perl pour son fonctionnement," 254 echo "mais perl n'a pas pu être détecté dans votre système. Veuillez vous " 255 echo "assurer que perl est installé et est spécifié dans votre chemin de " 256 echo "recherche, puis redémarrez ce script." 130 257 elif [ "$glilang" = "ru" ]; then 131 echo "âÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone ÔÒÅÂÕÅÔ Perl, ÞÔÏÂÙ ÉÍÅÔØ ×ÏÚÍÏÖÎÏÓÔØ" 132 echo "ÒÁÂÏÔÁÔØ, ÎÏ Perl ÎÅ ÂÙÌ × ×ÁÛÅÊ ÓÉÓÔÅÍÅ. ðÏÖÁÌÕÊÓÔÁ, ÐÏÄÔ×ÅÒÄÉÔÅ, ÞÔÏ " 133 echo "Perl ÕÓÔÁÎÏ×ÌÅÎ É ÎÁÈÏÄÉÔÓÑ ÎÁ ×ÁÛÅÍ ÐÕÔÉ ÐÏÉÓËÁ, ÚÁÔÅÍ ÐÏ×ÔÏÒÎÏ××ÅÄÉÔÅ" 134 echo "ÜÔÏÔ ÓËÒÉÐÔ." 135 else 136 echo "The Greenstone Librarian Interface requires perl in order to operate," 137 echo "but perl could not be detected on your system. Please ensure that perl" 138 echo "is installed and is on your search path, then rerun this script." 139 fi 140 exit 1 141 fi 142 143 144 ## ---- Check Java exists ---- 145 javapath= 146 147 # Some users may set the above line manually 148 if [ "x$javapath" = "x" ]; then 149 150 # If it is set, use the JAVA_HOME environment variable 151 if [ "x$JAVA_HOME" != "x" ]; then 152 javapath="$JAVA_HOME/bin/java" 153 154 # Check if Java is on the search path 155 else 156 javapath=`which java 2> /dev/null` 157 fi 158 fi 159 160 # Check that a Java executable has been found 161 if [ "$glilang" = "es" ]; then 162 echo "Revisando Java: $javapath" 163 elif [ "$glilang" = "fr" ]; then 164 echo "Vérification de Java: $javapath" 165 elif [ "$glilang" = "ru" ]; then 166 echo "ðÒÏ×ÅÒËÁ Java: $javapath" 167 else 168 echo "Checking Java: $javapath" 169 fi 170 if [ ! -x "$javapath" ]; then 171 echo 172 if [ "$glilang" = "es" ]; then 173 echo "No se pudo localizar una versión apropiada de Java. Usted deberá " 174 echo "instalar un Ambiente de Ejecución Java (versión 1.4 o superior) " 175 echo "antes de correr la Interfaz de la Biblioteca Digital Greenstone." 176 elif [ "$glilang" = "fr" ]; then 177 echo "Une version adéquate de Java n'a pas pu être localisée." 178 echo "Vous devez installer un Java Runtime Environment (version 1.4 ou" 179 echo "supérieur) avant de démarrer Greenstone Librarian Interface." 180 elif [ "$glilang" = "ru" ]; then 181 echo "îÅ ÕÄÁÌÏÓØ ÏÐÒÅÄÅÌÉÔØ ÍÅÓÔÏÎÁÈÏÖÄÅÎÉÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ×ÅÒÓÉÉ Java." 182 echo "÷Ù ÄÏÌÖÎÙ ÕÓÔÁÎÏ×ÉÔØ Java Runtime Environment (×ÅÒÓÉÀ 1.4 ÉÌÉ ×ÙÛÅ)" 183 echo "ÐÅÒÅÄ ××ÏÄÏÍ ÂÉÂÌÉÏÔÅÞÎÏÇÏ ÉÎÔÅÒÆÅÊÓÁ Greenstone." 184 else 185 echo "Failed to locate an appropriate version of Java. You must install a" 186 echo "Java Runtime Environment (version 1.4 or greater) before running the" 187 echo "Greenstone Librarian Interface." 188 fi 189 exit 1 190 fi 258 echo "âÉÂÌÉÏÔÅÞÎÙÊ $PROGNAME ÔÒÅÂÕÅÔ Perl, ÞÔÏÂÙ ÉÍÅÔØ ×ÏÚÍÏÖÎÏÓÔØ" 259 echo "ÒÁÂÏÔÁÔØ, ÎÏ Perl ÎÅ ÂÙÌ × ×ÁÛÅÊ ÓÉÓÔÅÍÅ. ðÏÖÁÌÕÊÓÔÁ, ÐÏÄÔ×ÅÒÄÉÔÅ, ÞÔÏ " 260 echo "Perl ÕÓÔÁÎÏ×ÌÅÎ É ÎÁÈÏÄÉÔÓÑ ÎÁ ×ÁÛÅÍ ÐÕÔÉ ÐÏÉÓËÁ, ÚÁÔÅÍ ÐÏ×ÔÏÒÎÏ××ÅÄÉÔÅ" 261 echo "ÜÔÏÔ ÓËÒÉÐÔ." 262 else 263 echo "The $PROGNAME requires Perl in order to operate," 264 echo "but perl could not be detected on your system. Please ensure that perl" 265 echo "is installed and is on your search path, then rerun this script." 266 fi 267 exit 1 268 fi 269 echo $perlpath 270 echo 271 272 ## ---- Check Java ---- 273 echo "Java:" 274 MINIMUM_JAVA_VERSION=1.4.0_00 275 276 # Some users may set this line manually 277 #JAVA_HOME= 278 279 if [ -z $javapath ]; then 280 281 # sus out search4j 282 if [ "$_version" -eq 2 -a -e "$GSDLHOME/bin/$GSDLOS/search4j" ]; then 283 SEARCH4J_EXECUTABLE=$GSDLHOME/bin/$GSDLOS/search4j 284 elif [ "$_version" -eq 3 -a -e "$GSDL3SRCHOME/bin/$GSDLOS/search4j" ]; then 285 SEARCH4J_EXECUTABLE=$GSDL3SRCHOME/bin/search4j 286 elif [ -e "../bin/$GSDLOS/search4j" ]; then 287 SEARCH4J_EXECUTABLE=../bin/$GSDLOS/search4j 288 elif [ -e "../bin/search4j" ]; then 289 SEARCH4J_EXECUTABLE=../bin/search4j 290 else 291 echo "Couldn't determine the location of the search4j executable" 292 echo "If you are running Greenstone2" 293 echo " * check GSDLHOME is set" 294 echo " * check bin/$GSDLOS/search4j exists" 295 echo " * check bin/$GSDLOS/search4j is executable" 296 echo "If you are running Greenstone3" 297 echo " * check GSDL3SRCHOME is set" 298 echo " * check bin/search4j exists" 299 echo " * check bin/search4j is executable" 300 echo " * try running 'ant compile-search4j'" 301 fi 302 303 # Give search4j a hint to find Java depending on the platform 304 if [ $GSDLOS = linux ]; then 305 HINT=`cd ..;pwd`/packages/jre 306 elif [ $GSDLOS = darwin ]; then 307 HINT=/System/Library/Frameworks/JavaVM.framework/Home 308 fi 309 310 javapath=`$SEARCH4J_EXECUTABLE -e -p $HINT -m $MINIMUM_JAVA_VERSION` 311 312 if [ "$?" != "0" ]; then 313 314 OLDVER=`"$SEARCH4J_EXECUTABLE" -v -p "$HINT"` 315 316 if [ "$?" = "0" ]; then 317 318 if [ "$glilang" = "es" ]; then 319 echo "La versión del Ambiente de Ejecución Java (JRE por sus siglas en " 320 echo "inglés) que usted tiene instalada es demasiado vieja para ejecutar " 321 echo "la Interfaz de la $PROGNAME. Por favor instale " 322 echo "una nueva versión del Ambiente de Ejecución Java (versión $MINIMUM_JAVA_VERSION o " 323 echo "posterior) y ejecute nuevamente este guión." 324 elif [ "$glilang" = "fr" ]; then 325 echo "La version de Java Runtime Environment que vous avez installée est" 326 echo "trop vielle pour faire fonctionner $PROGNAME." 327 echo "Veuillez installer une nouvelle version du JRE (version $MINIMUM_JAVA_VERSION ou plus" 328 echo "récente) et redémarrez le script." 329 elif [ "$glilang" = "ru" ]; then 330 echo "÷ÅÒÓÉÑ Java Runtime Environment, ËÏÔÏÒÕÀ ÷Ù ÕÓÔÁÎÏ×ÉÌÉ, ÏÞÅÎØ ÓÔÁÒÁ," 331 echo "ÞÔÏÂÙ ÕÐÒÁ×ÌÑÔØ ÂÉÂÌÉÏÔÅÞÎÙÍ $PROGNAME. ðÏÖÁÌÕÊÓÔÁ, " 332 echo "ÕÓÔÁÎÏ×ÉÔÅ ÎÏ×ÕÀ ×ÅÒÓÉÀ JRE (×ÅÒÓÉÀ $MINIMUM_JAVA_VERSION ÉÌÉ ÂÏÌÅÅ ÎÏ×ÕÀ) É" 333 echo "ÐÅÒÅÕÓÔÁÎÏ×ÉÔÅ ÜÔÏÔ ÓËÒÉÐÔ" 334 else 335 echo "The version of the Java Runtime Environment you have installed ($OLDVER)" 336 echo "is too old to run the $PROGNAME. Please install a new" 337 echo "version of the JRE (version $MINIMUM_JAVA_VERSION or newer) and rerun this script." 338 fi 339 exit 1 340 341 else 342 343 echo 344 if [ "$glilang" = "es" ]; then 345 echo "No se pudo localizar una versión apropiada de Java. Usted deberá " 346 echo "instalar un Ambiente de Ejecución Java (versión $MINIMUM_JAVA_VERSION o superior) " 347 echo "antes de correr la Interfaz de la $PROGNAME." 348 elif [ "$glilang" = "fr" ]; then 349 echo "Une version adéquate de Java n'a pas pu être localisée." 350 echo "Vous devez installer un Java Runtime Environment (version $MINIMUM_JAVA_VERSION ou" 351 echo "supérieur) avant de démarrer $PROGNAME." 352 echo "Si vous avez Java installé sur votre ordinateur veuillez vérifier la variable" 353 echo "d'environnement JAVA_HOME." 354 elif [ "$glilang" = "ru" ]; then 355 echo "îÅ ÕÄÁÌÏÓØ ÏÐÒÅÄÅÌÉÔØ ÍÅÓÔÏÎÁÈÏÖÄÅÎÉÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ×ÅÒÓÉÉ Java." 356 echo "÷Ù ÄÏÌÖÎÙ ÕÓÔÁÎÏ×ÉÔØ Java Runtime Environment (×ÅÒÓÉÀ $MINIMUM_JAVA_VERSION ÉÌÉ ×ÙÛÅ)" 357 echo "ÐÅÒÅÄ ××ÏÄÏÍ ÂÉÂÌÉÏÔÅÞÎÏÇÏ $PROGNAME." 358 else 359 echo "Failed to locate an appropriate version of Java. You must install a" 360 echo "Java Runtime Environment (version $MINIMUM_JAVA_VERSION or greater) before running the" 361 echo "$PROGNAME." 362 echo "If you have Java intalled on your machine please set the environment variable JAVA_HOME." 363 fi 364 fi 365 366 fi 367 368 fi 369 echo $javapath 370 echo 191 371 192 372 … … 195 375 if [ $? -ne 2 ] ; then 196 376 echo 197 if [ "$glilang" = "es" ]; then198 echo "La versión del Ambiente de Ejecución Java (JRE por sus siglas en "199 echo "inglés) que usted tiene instalada es demasiado vieja para ejecutar "200 echo "la Interfaz de la Biblioteca Digital Greenstone. Por favor instale "201 echo "una nueva versión del Ambiente de Ejecución Java (versión 1.4 o "202 echo "posterior) y ejecute nuevamente este guión."203 elif [ "$glilang" = "fr" ]; then204 echo "La version de Java Runtime Environment que vous avez installée est"205 echo "trop vielle pour faire fonctionner Greenstone Librarian Interface."206 echo "Veuillez installer une nouvelle version du JRE (version 1.4 ou plus"207 echo "récente) et redémarrez le script."208 elif [ "$glilang" = "ru" ]; then209 echo "÷ÅÒÓÉÑ Java Runtime Environment, ËÏÔÏÒÕÀ ÷Ù ÕÓÔÁÎÏ×ÉÌÉ, ÏÞÅÎØ ÓÔÁÒÁ,"210 echo "ÞÔÏÂÙ ÕÐÒÁ×ÌÑÔØ ÂÉÂÌÉÏÔÅÞÎÙÍ ÉÎÔÅÒÆÅÊÓÏÍ Greenstone. ðÏÖÁÌÕÊÓÔÁ, "211 echo "ÕÓÔÁÎÏ×ÉÔÅ ÎÏ×ÕÀ ×ÅÒÓÉÀ JRE (×ÅÒÓÉÀ 1.4 ÉÌÉ ÂÏÌÅÅ ÎÏ×ÕÀ) É"212 echo "ÐÅÒÅÕÓÔÁÎÏ×ÉÔÅ ÜÔÏÔ ÓËÒÉÐÔ"213 else214 echo "The version of the Java Runtime Environment you have installed is too"215 echo "old to run the Greenstone Librarian Interface. Please install a new"216 echo "version of the JRE (version 1.4 or newer) and rerun this script."217 fi218 exit 1219 377 fi 220 378 … … 223 381 echo 224 382 if [ "$glilang" = "es" ]; then 225 226 383 echo "Usted necesita compilar la Interfaz de la Biblioteca Digital Greenstone" 384 echo "(por medio de makegli.sh) antes de ejecutar este guión." 227 385 elif [ "$glilang" = "fr" ]; then 228 229 386 echo "Vous devez compiler le Greenstone Interface (en utilisant makegli.sh)" 387 echo "avant d'exécuter ce script." 230 388 elif [ "$glilang" = "ru" ]; then 231 echo "÷Ù ÄÏÌÖÎÙ ËÏÍÐÉÌÉÒÏ×ÁÔØ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone" 232 echo "(ÉÓÐÏÌØÚÕÑ makegli.sh) ÐÅÒÅÄ ××ÏÄÏÍ ÜÔÏÇÏ ÓËÒÉÐÔÁ" 233 else 234 echo "You need to compile the Greenstone Librarian Interface (using makegli.sh)" 235 echo "before running this script." 236 fi 237 exit 1 238 fi 389 echo "÷Ù ÄÏÌÖÎÙ ËÏÍÐÉÌÉÒÏ×ÁÔØ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone" 390 echo "(ÉÓÐÏÌØÚÕÑ makegli.sh) ÐÅÒÅÄ ××ÏÄÏÍ ÜÔÏÇÏ ÓËÒÉÐÔÁ" 391 else 392 echo "You need to compile the Greenstone Librarian Interface (using makegli.sh)" 393 echo "before running this script." 394 fi 395 exit 1 396 fi 397 398 ## ---- Explain how to bypass Imagemagick and Ghostscript bundled with Greenstone if needed ---- 399 if [ -e "$GSDLHOME/bin/$GSDLOS/ghostscript" ] ; then 400 echo "GhostScript bundled with Greenstone will be used, if you wish to use the version installed on your system (if any) please go to $GSDLHOME/bin/$GSDLOS and rename the folder called ghostscript to something else." 401 fi 402 echo 403 echo 404 if [ -e "$GSDLHOME/bin/$GSDLOS/imagemagick" ] ; then 405 echo "ImageMagick bundled with Greenstone will be used, if you wish to use the version installed on your system (if any) please go to $GSDLHOME/bin/$GSDLOS and rename the folder called imagemagick to something else." 406 echo 407 echo 408 fi 409 239 410 240 411 ## ---- Finally, run the GLI ---- 241 echo242 412 if [ "$glilang" = "es" ]; then 243 echo "Ejecutando la Interfaz de la Biblioteca Digital Greenstone..."413 echo "Ejecutando la Interfaz de la $PROGNAME..." 244 414 elif [ "$glilang" = "fr" ]; then 245 echo "Exécution de Greenstone Librarian Interface"415 echo "Exécution de $PROGNAME..." 246 416 elif [ "$glilang" = "ru" ]; then 247 echo "ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone..."417 echo "ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ $PROGNAME..." 248 418 else 249 echo "Running the Greenstone Librarian Interface..." 250 fi 251 419 echo "Running the $PROGNAME..." 420 fi 421 422 # basic_command is the cmd string common to both Greenstone 3 and Greenstone 2 execution 423 basic_command="$javapath -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar org.greenstone.gatherer.GathererProg" 252 424 stop_gli=0 253 425 while [ "$stop_gli" = "0" ] ; do 254 255 # Other arguments you can provide to GLI to work around memory limitations, or debug 256 # -Xms<number>M To set minimum memory (by default 32MB) 257 # -Xmx<number>M To set maximum memory (by default the nearest 2^n to the total remaining physical memory) 258 # -verbose:gc To set garbage collection messages 259 # -Xincgc For incremental garbage collection (significantly slows performance) 260 # -Xprof Function call profiling 261 # -Xloggc:<file> Write garbage collection log 262 263 264 265 $javapath -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl $GSDLHOME -gsdlos $GSDLOS $* 266 exit_status=$? 267 268 if [ "$exit_status" != "2" ] ; then 269 stop_gli=1 270 else 271 echo 272 if [ "$glilang" = "es" ]; then 273 echo "Restarting/Ejecutando la Interfaz de la Biblioteca Digital Greenstone..." 274 elif [ "$glilang" = "fr" ]; then 275 echo "Restarting/Exécution de Greenstone Librarian Interface" 276 elif [ "$glilang" = "ru" ]; then 277 echo "Restarting/ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone..." 278 else 279 echo "Restarting the Greenstone Librarian Interface..." 280 fi 281 282 fi 426 427 # Other arguments you can provide to GLI to work around memory limitations, or debug 428 # -Xms<number>M To set minimum memory (by default 32MB) 429 # -Xmx<number>M To set maximum memory (by default the nearest 2^n to the total remaining physical memory) 430 # -verbose:gc To set garbage collection messages 431 # -Xincgc For incremental garbage collection (significantly slows performance) 432 # -Xprof Function call profiling 433 # -Xloggc:<file> Write garbage collection log 434 435 exit_status=0 436 if [ "$_version" -eq 2 ]; then 437 $basic_command -gsdl $GSDLHOME -gsdlos $GSDLOS $* 438 exit_status=$? 439 elif [ "$_version" -eq 3 ]; then 440 $basic_command -gsdl $GSDLHOME -gsdlos $GSDLOS -gsdl3 $GSDL3HOME -gsdl3src $GSDL3SRCHOME $* 441 exit_status=$? 442 fi 443 444 if [ "$exit_status" != "2" ] ; then 445 stop_gli=1 446 else 447 echo 448 if [ "$glilang" = "es" ]; then 449 echo "Restarting/Ejecutando la Interfaz de la $PROGNAME..." 450 elif [ "$glilang" = "fr" ]; then 451 echo "Restarting/Exécution de $PROGNAME..." 452 elif [ "$glilang" = "ru" ]; then 453 echo "Restarting/ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ $PROGNAME..." 454 else 455 echo "Restarting the $PROGNAME..." 456 fi 457 fi 283 458 done 284 459
Note:
See TracChangeset
for help on using the changeset viewer.