Changeset 19355 for gli/trunk/gli.sh
- Timestamp:
- 2009-05-08T21:38:04+12:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/gli.sh
r19171 r19355 232 232 echo 233 233 234 ## ---- Check Perl exists ---- 235 perlpath= 236 237 # Some users may set the above line manually 238 if [ "x$perlpath" = "x" ]; then 239 # Check if Perl is on the search path 240 perlpath=`which perl 2> /dev/null` 241 fi 242 243 # Check that a Perl executable has been found 244 echo "Perl:" 245 if [ ! -x "$perlpath" ] ; then 246 echo 247 if [ "$glilang" = "es" ]; then 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." 252 elif [ "$glilang" = "fr" ]; then 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." 257 elif [ "$glilang" = "ru" ]; then 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 234 ## ---- find perl ---- 235 exit_status=0 236 ./findperl.sh 237 exit_status=$? 238 if [ "$exit_status" -eq 1 ]; then 239 exit 1; 240 fi 271 241 272 242 ## ---- 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 371 372 373 ## -- Check the version of Java is new enough (1.4.0 or higher) to run the GLI -- 374 `"$javapath" -classpath . CheckJavaVersion > /dev/null` 375 if [ $? -ne 2 ] ; then 376 echo 243 # call the script with source, so that we have the variables it sets ($javapath) 244 exit_status=0 245 source ./findjava.sh 246 exit_status=$? 247 if [ "$exit_status" -eq 1 ]; then 248 exit 1; 377 249 fi 378 250
Note:
See TracChangeset
for help on using the changeset viewer.