Changeset 12287 for trunk/gli/gli4gs3.sh
- Timestamp:
- 2006-07-24T15:06:16+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/gli4gs3.sh
r11801 r12287 3 3 4 4 echo 5 if [ "$glilang" = ="es" ]; then5 if [ "$glilang" = "es" ]; then 6 6 echo "Interfaz de la Biblioteca Digital Greenstone (Greenstone Librarian Interface - GLI)" 7 7 echo "Copyright (C) 2005, New Zealand Digital Library Project, University Of Waikato" … … 9 9 echo "Para mayor información vea los términos de la licencia en LICENSE.txt" 10 10 echo "Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita" 11 elif [ "$glilang" = ="fr" ]; then11 elif [ "$glilang" = "fr" ]; then 12 12 echo "Interface du Bibliothécaire Greenstone (Greenstone Librarian Interface - GLI)" 13 13 echo "Copyright (C) 2005, New Zealand Digital Library Project, University Of Waikato" 14 14 echo "GLI est fourni sans AUCUNE GARANTIE; pour des détails, voir LICENSE.txt" 15 15 echo "Ceci est un logiciel libre, et vous êtes invité à le redistribuer" 16 elif [ "$glilang" = ="ru" ]; then16 elif [ "$glilang" = "ru" ]; then 17 17 echo "âÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone (Greenstone Librarian Interface - GLI)" 18 18 echo "Copyright (C) 2005, New Zealand Digital Library Project, University Of Waikato" … … 32 32 thisdir=`pwd` 33 33 if [ ! -f "${thisdir}/gli4gs3.sh" ]; then 34 if [ "$glilang" = ="es" ]; then34 if [ "$glilang" = "es" ]; then 35 35 echo "Este guión deberá ejecutarse desde el directorio en el que reside." 36 elif [ "$glilang" = ="fr" ]; then36 elif [ "$glilang" = "fr" ]; then 37 37 echo "Ce script doit être exécuté à partir du répertoire dans lequel il se trouve." 38 elif [ "$glilang" = ="ru" ]; then38 elif [ "$glilang" = "ru" ]; then 39 39 echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ" 40 40 else … … 50 50 51 51 # Some users may set the above line manually 52 if [ " $gsdl3path" == "" ]; then52 if [ "x$gsdl3path" = "x" ]; then 53 53 # Check the environment variable first 54 if [ " $GSDL3SRCHOME" != "" ]; then54 if [ "x$GSDL3SRCHOME" != "x" ]; then 55 55 gsdl3path=$GSDL3SRCHOME 56 56 57 57 # If it is not set, assume that the GLI is installed as a subdirectory of Greenstone 3 58 58 else 59 pushd .. > /dev/null 60 gsdl3path=`pwd` 61 popd > /dev/null 59 gsdl3path=`(cd .. && pwd)` 62 60 fi 63 61 fi 64 62 65 63 # Check that the Greenstone 3 installation looks OK 66 if [ "$glilang" = ="es" ]; then64 if [ "$glilang" = "es" ]; then 67 65 echo "Revisando GSDL3: $gsdl3path" 68 elif [ "$glilang" = ="fr" ]; then66 elif [ "$glilang" = "fr" ]; then 69 67 echo "Vérification de GSDL3: $gsdl3path" 70 elif [ "$glilang" = ="ru" ]; then68 elif [ "$glilang" = "ru" ]; then 71 69 echo "ðÒÏ×ÅÒËÁ GSDL3: $gsdl3path" 72 70 else … … 75 73 if [ ! -f "${gsdl3path}/gs3-setup.sh" ] ; then 76 74 echo 77 if [ "$glilang" = ="es" ]; then75 if [ "$glilang" = "es" ]; then 78 76 echo "No se pudo encontrar la instalación de Greenstone 3 o está incompleta." 79 77 echo "Trate de reinstalar Greenstone 3 y a continuación ejecute nuevamente" 80 78 echo "este guión." 81 elif [ "$glilang" = ="fr" ]; then79 elif [ "$glilang" = "fr" ]; then 82 80 echo "L'installation de Greenstone 3 est introuvable ou incomplète." 83 81 echo "Essayez de réinstaller Greenstone 3 et exécutez ce script à nouveau." 84 elif [ "$glilang" = ="ru" ]; then82 elif [ "$glilang" = "ru" ]; then 85 83 echo "éÎÓÔÁÌÌÑÃÉÑ Greenstone 3 ÎÅ ÂÙÌÁ ÎÁÊÄÅÎÁ ÉÌÉ ÏÎÁ ÎÅÐÏÌÎÁ." 86 84 echo "ðÏÐÒÏÂÕÊÔÅ ÐÏ×ÔÏÒÎÏ ÕÓÔÁÎÏ×ÉÔØ Greenstone 3, Á ÚÁÔÅÍ ××ÅÓÔÉ ÜÔÏÔ ÓËÒÉÐÔ ÓÎÏ×Á." … … 93 91 94 92 # Setup Greenstone 3, unless it has already been done 95 if [ " $GSDL3HOME" == "" ] || [ "$GSDL3SRCHOME" == "" ]; then96 pushd $gsdl3path > /dev/null97 sourcegs3-setup.sh98 popd > /dev/null93 if [ "x$GSDL3HOME" = "x" -o "x$GSDL3SRCHOME" = "x" ]; then 94 cd "$gsdl3path" 95 . gs3-setup.sh 96 cd "$thisdir" 99 97 fi 100 98 … … 105 103 106 104 # Some users may set the above line manually 107 if [ " $gsdlpath" == "" ]; then105 if [ "x$gsdlpath" = "x" ]; then 108 106 # Check the environment variable first 109 if [ " $GSDLHOME" != "" ]; then107 if [ "x$GSDLHOME" != "x" ]; then 110 108 gsdlpath=$GSDLHOME 111 109 … … 117 115 118 116 # Check that the Greenstone installation looks OK 119 if [ "$glilang" = ="es" ]; then117 if [ "$glilang" = "es" ]; then 120 118 echo "Revisando GSDL: $gsdlpath" 121 elif [ "$glilang" = ="fr" ]; then119 elif [ "$glilang" = "fr" ]; then 122 120 echo "Vérification de GSDL: $gsdlpath" 123 elif [ "$glilang" = ="ru" ]; then121 elif [ "$glilang" = "ru" ]; then 124 122 echo "ðÒÏ×ÅÒËÁ GSDL: $gsdlpath" 125 123 else … … 128 126 if [ ! -f "${gsdlpath}/setup.bash" ] ; then 129 127 echo 130 if [ "$glilang" = ="es" ]; then128 if [ "$glilang" = "es" ]; then 131 129 echo "No se pudo encontrar la instalación de Greenstone o está incompleta." 132 130 echo "Trate de reinstalar Greenstone y a continuación ejecute nuevamente" 133 131 echo "este guión." 134 elif [ "$glilang" = ="fr" ]; then132 elif [ "$glilang" = "fr" ]; then 135 133 echo "L'installation de Greenstone est introuvable ou incomplète." 136 134 echo "Essayez de réinstaller Greenstone et exécutez ce script à nouveau." 137 elif [ "$glilang" = ="ru" ]; then135 elif [ "$glilang" = "ru" ]; then 138 136 echo "éÎÓÔÁÌÌÑÃÉÑ Greenstone ÎÅ ÂÙÌÁ ÎÁÊÄÅÎÁ ÉÌÉ ÏÎÁ ÎÅÐÏÌÎÁ." 139 137 echo "ðÏÐÒÏÂÕÊÔÅ ÐÏ×ÔÏÒÎÏ ÕÓÔÁÎÏ×ÉÔØ Greenstone, Á ÚÁÔÅÍ ××ÅÓÔÉ ÜÔÏÔ ÓËÒÉÐÔ ÓÎÏ×Á." … … 146 144 147 145 # Setup Greenstone, unless it has already been done 148 if [ " $GSDLHOME" == "" ]; then149 pushd $gsdlpath > /dev/null150 sourcesetup.bash151 popd > /dev/null146 if [ "x$GSDLHOME" = "x" ]; then 147 cd "$gsdlpath" 148 . setup.bash 149 cd "$thisdir" 152 150 fi 153 151 … … 157 155 158 156 # Some users may set the above line manually 159 if [ " $perlpath" == "" ]; then157 if [ "x$perlpath" = "x" ]; then 160 158 # Check if Perl is on the search path 161 159 perlpath=`which perl 2> /dev/null` … … 163 161 164 162 # Check that a Perl executable has been found 165 if [ "$glilang" = ="es" ]; then163 if [ "$glilang" = "es" ]; then 166 164 echo "Revisando Perl: $perlpath" 167 elif [ "$glilang" = ="fr" ]; then165 elif [ "$glilang" = "fr" ]; then 168 166 echo "Vérification de Perl: $perlpath" 169 elif [ "$glilang" = ="ru" ]; then167 elif [ "$glilang" = "ru" ]; then 170 168 echo "ðÒÏ×ÅÒËÁ Perl: $perlpath" 171 169 else … … 174 172 if [ ! -x "$perlpath" ] ; then 175 173 echo 176 if [ "$glilang" = ="es" ]; then174 if [ "$glilang" = "es" ]; then 177 175 echo "La Interfaz de la Biblioteca Digital Greenstone requiere Perl para " 178 176 echo "poder operar, pero éste no aparece en su sistema. Por favor asegúrese " 179 177 echo "de que Perl está instalado y se encuentra en su ruta de búsqueda. A " 180 178 echo "continuación ejecute nuevamente este guión." 181 elif [ "$glilang" = ="fr" ]; then179 elif [ "$glilang" = "fr" ]; then 182 180 echo "Greenstone Librarian Interface nécessite perl pour son fonctionnement," 183 181 echo "mais perl n'a pas pu être détecté dans votre système. Veuillez vous " 184 182 echo "assurer que perl est installé et est spécifié dans votre chemin de " 185 183 echo "recherche, puis redémarrez ce script." 186 elif [ "$glilang" = ="ru" ]; then184 elif [ "$glilang" = "ru" ]; then 187 185 echo "âÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone ÔÒÅÂÕÅÔ Perl, ÞÔÏÂÙ ÉÍÅÔØ ×ÏÚÍÏÖÎÏÓÔØ" 188 186 echo "ÒÁÂÏÔÁÔØ, ÎÏ Perl ÎÅ ÂÙÌ × ×ÁÛÅÊ ÓÉÓÔÅÍÅ. ðÏÖÁÌÕÊÓÔÁ, ÐÏÄÔ×ÅÒÄÉÔÅ, ÞÔÏ " … … 202 200 203 201 # Some users may set the above line manually 204 if [ " $javapath" == "" ]; then202 if [ "x$javapath" = "x" ]; then 205 203 206 204 # If it is set, use the JAVA_HOME environment variable 207 if [ " $JAVA_HOME" != "" ]; then205 if [ "x$JAVA_HOME" != "x" ]; then 208 206 javapath="$JAVA_HOME/bin/java" 209 207 … … 215 213 216 214 # Check that a Java executable has been found 217 if [ "$glilang" = ="es" ]; then215 if [ "$glilang" = "es" ]; then 218 216 echo "Revisando Java: $javapath" 219 elif [ "$glilang" = ="fr" ]; then217 elif [ "$glilang" = "fr" ]; then 220 218 echo "Vérification de Java: $javapath" 221 elif [ "$glilang" = ="ru" ]; then219 elif [ "$glilang" = "ru" ]; then 222 220 echo "ðÒÏ×ÅÒËÁ Java: $javapath" 223 221 else … … 226 224 if [ ! -x "$javapath" ]; then 227 225 echo 228 if [ "$glilang" = ="es" ]; then226 if [ "$glilang" = "es" ]; then 229 227 echo "No se pudo localizar una versión apropiada de Java. Usted deberá " 230 228 echo "instalar un Ambiente de Ejecución Java (versión 1.4 o superior) " 231 229 echo "antes de correr la Interfaz de la Biblioteca Digital Greenstone." 232 elif [ "$glilang" = ="fr" ]; then230 elif [ "$glilang" = "fr" ]; then 233 231 echo "Une version adéquate de Java n'a pas pu être localisée." 234 232 echo "Vous devez installer un Java Runtime Environment (version 1.4 ou" 235 233 echo "supérieur) avant de démarrer Greenstone Librarian Interface." 236 elif [ "$glilang" = ="ru" ]; then234 elif [ "$glilang" = "ru" ]; then 237 235 echo "îÅ ÕÄÁÌÏÓØ ÏÐÒÅÄÅÌÉÔØ ÍÅÓÔÏÎÁÈÏÖÄÅÎÉÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ×ÅÒÓÉÉ Java." 238 236 echo "÷Ù ÄÏÌÖÎÙ ÕÓÔÁÎÏ×ÉÔØ Java Runtime Environment (×ÅÒÓÉÀ 1.4 ÉÌÉ ×ÙÛÅ)" … … 251 249 if [ $? -ne 2 ] ; then 252 250 echo 253 if [ "$glilang" = ="es" ]; then251 if [ "$glilang" = "es" ]; then 254 252 echo "La versión del Ambiente de Ejecución Java (JRE por sus siglas en " 255 253 echo "inglés) que usted tiene instalada es demasiado vieja para ejecutar " … … 257 255 echo "una nueva versión del Ambiente de Ejecución Java (versión 1.4 o " 258 256 echo "posterior) y ejecute nuevamente este guión." 259 elif [ "$glilang" = ="fr" ]; then257 elif [ "$glilang" = "fr" ]; then 260 258 echo "La version de Java Runtime Environment que vous avez installée est" 261 259 echo "trop vielle pour faire fonctionner Greenstone Librarian Interface." 262 260 echo "Veuillez installer une nouvelle version du JRE (version 1.4 ou plus" 263 261 echo "récente) et redémarrez le script." 264 elif [ "$glilang" = ="ru" ]; then262 elif [ "$glilang" = "ru" ]; then 265 263 echo "÷ÅÒÓÉÑ Java Runtime Environment, ËÏÔÏÒÕÀ ÷Ù ÕÓÔÁÎÏ×ÉÌÉ, ÏÞÅÎØ ÓÔÁÒÁ," 266 264 echo "ÞÔÏÂÙ ÕÐÒÁ×ÌÑÔØ ÂÉÂÌÉÏÔÅÞÎÙÍ ÉÎÔÅÒÆÅÊÓÏÍ Greenstone. ðÏÖÁÌÕÊÓÔÁ, " … … 281 279 if [ ! -f "classes/org/greenstone/gatherer/GathererProg.class" ] && [ ! -f "GLI.jar" ]; then 282 280 echo 283 if [ "$glilang" = ="es" ]; then281 if [ "$glilang" = "es" ]; then 284 282 echo "Usted necesita compilar la Interfaz de la Biblioteca Digital Greenstone" 285 283 echo "(por medio de makegli.sh) antes de ejecutar este guión." 286 elif [ "$glilang" = ="fr" ]; then284 elif [ "$glilang" = "fr" ]; then 287 285 echo "Vous devez compiler le Greenstone Interface (en utilisant makegli.sh)" 288 286 echo "avant d'exécuter ce script." 289 elif [ "$glilang" = ="ru" ]; then287 elif [ "$glilang" = "ru" ]; then 290 288 echo "÷Ù ÄÏÌÖÎÙ ËÏÍÐÉÌÉÒÏ×ÁÔØ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone" 291 289 echo "(ÉÓÐÏÌØÚÕÑ makegli.sh) ÐÅÒÅÄ ××ÏÄÏÍ ÜÔÏÇÏ ÓËÒÉÐÔÁ" … … 297 295 fi 298 296 299 if [ "$1" == "-test" ]; then300 if [ "$glilang" == "es" ]; then301 echo "Clase de prueba: $2"302 echo "Argumentos $*"303 elif [ "$glilang" == "fr" ]; then304 echo "Classe de test: $2"305 echo "Arguments $*"306 elif [ "$glilang" == "ru" ]; then307 echo "éÓÐÙÔÁÔÅÌØÎÙÊ ËÌÁÓÓ: $2"308 echo "ðÁÒÁÍÅÔÒÙ $*"309 else310 echo "Testing class: $2"311 echo "Arguments $*"312 fi313 $javapath -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar $2 $3314 exit 0315 fi316 317 297 ## ---- Finally, run the GLI ---- 318 298 echo 319 if [ "$glilang" = ="es" ]; then299 if [ "$glilang" = "es" ]; then 320 300 echo "Ejecutando la Interfaz de la Biblioteca Digital Greenstone..." 321 elif [ "$glilang" = ="fr" ]; then301 elif [ "$glilang" = "fr" ]; then 322 302 echo "Exécution de Greenstone Librarian Interface" 323 elif [ "$glilang" = ="ru" ]; then303 elif [ "$glilang" = "ru" ]; then 324 304 echo "ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone..." 325 305 else 326 306 echo "Running the Greenstone Librarian Interface..." 327 307 fi 308 309 stop_gli=0 310 while [ "$stop_gli" = "0" ] ; do 328 311 329 312 # Other arguments you can provide to GLI to work around memory limitations, or debug … … 335 318 # -Xloggc:<file> Write garbage collection log 336 319 337 $javapath -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl $GSDLHOME -gsdl3 $GSDL3HOME -gsdl3src $GSDL3SRCHOME -wget $wgetpath $* 338 339 if [ "$glilang" == "es" ]; then 320 $javapath -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar org.greenstone.gatherer.GathererProg -gsdl $GSDLHOME -gsdl3 $GSDL3HOME -gsdl3src $GSDL3SRCHOME -wget $wgetpath $* 321 exit_status=$? 322 323 if [ "$exit_status" != "2" ] ; then 324 stop_gli=1 325 else 326 echo 327 if [ "$glilang" = "es" ]; then 328 echo "Restarting/Ejecutando la Interfaz de la Biblioteca Digital Greenstone..." 329 elif [ "$glilang" = "fr" ]; then 330 echo "Restarting/Exécution de Greenstone Librarian Interface" 331 elif [ "$glilang" = "ru" ]; then 332 echo "Restarting/ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone..." 333 else 334 echo "Restarting the Greenstone Librarian Interface..." 335 fi 336 337 fi 338 done 339 340 if [ "$glilang" = "es" ]; then 340 341 echo "¡Hecho!" 341 elif [ "$glilang" = ="fr" ]; then342 elif [ "$glilang" = "fr" ]; then 342 343 echo "Terminé!" 343 elif [ "$glilang" = ="ru" ]; then344 elif [ "$glilang" = "ru" ]; then 344 345 echo "÷ÙÐÏÌÎÅÎÏ!" 345 346 else
Note:
See TracChangeset
for help on using the changeset viewer.