Changeset 16365

Show
Ignore:
Timestamp:
11.07.2008 17:00:18 (11 years ago)
Author:
ak19
Message:

Introduced -fedora flag into fli.sh since that is now already processed by GLI. This in order to be consistent with this flag being used when client-fli.sh is run.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gli/trunk/client-fli.sh

    r14976 r16365  
    11#!/bin/sh 
    2 glilang=en 
    32 
    4 echo 
    5 if [ "$glilang" = "es" ]; then 
    6     echo "Interfaz de la Biblioteca Digital Greenstone (Greenstone Librarian Interface - GLI)" 
    7     echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 
    8     echo "La Interfaz de la Biblioteca Digital Greenstone NO INCLUYE ABSOLUTAMENTE NINGUNA GARANTÍA." 
    9     echo "Para mayor información vea los términos de la licencia en LICENSE.txt" 
    10     echo "Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita" 
    11 elif [ "$glilang" = "fr" ]; then 
    12     echo "Interface du Bibliothécaire Greenstone (Greenstone Librarian Interface - GLI)" 
    13     echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 
    14     echo "GLI est fourni sans AUCUNE GARANTIE; pour des détails, voir LICENSE.txt" 
    15     echo "Ceci est un logiciel libre, et vous êtes invité à le redistribuer" 
    16 elif [ "$glilang" = "ru" ]; then 
    17     echo "âÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone (Greenstone Librarian Interface - GLI)" 
    18     echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 
    19     echo "âéç ÎÅ ÄÁÅÔ áâóïìàôîï îéëáëéè çáòáîôéê; ÄÅÔÁÌÉ ÓÍ. × ÔÅËÓÔÅ LICENSE.TXT" 
    20     echo "üÔÏ - Ó×ÏÂÏÄÎÏ ÒÁÓÐÒÏÓÔÒÁÎÑÅÍÏÅ ÐÒÏÇÒÁÍÍÎÏÅ ÏÂÅÓÐÅÞÅÎÉÅ É ÷Ù ÍÏÖÅÔÅ ÒÁÓÐÒÏÓÔÒÁÎÑÔØ ÅÇÏ" 
    21 else 
    22     echo "Greenstone Librarian Interface (GLI)" 
    23     echo "Copyright (C) 2006, New Zealand Digital Library Project, University Of Waikato" 
    24     echo "GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt" 
    25     echo "This is free software, and you are welcome to redistribute it" 
    26 fi 
    27 echo 
     3PROGNAME="Fedora" 
     4export PROGNAME 
    285 
    29 ##  -------- Run the Greenstone Librarian Interface -------- 
     6PROGNAME_EN="Fedora Librarian Interface" 
     7export PROGNAME_EN 
    308 
    31 # This script must be run from within the directory in which it lives 
    32 thisdir=`pwd` 
    33 if [ ! -f "${thisdir}/client-gli.sh" ]; then 
    34     if [ "$glilang" = "es" ]; then 
    35         echo "Este guión deberá ejecutarse desde el directorio en el que reside." 
    36     elif [ "$glilang" = "fr" ]; then 
    37     echo "Ce script doit être exécuté à partir du répertoire dans lequel il se trouve." 
    38     elif [ "$glilang" = "ru" ]; then 
    39     echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ" 
    40     else 
    41     echo "This script must be run from the directory in which it resides." 
    42     fi 
    43     exit 1 
    44 fi 
     9PROGABBR="FLI" 
     10export PROGABBR 
    4511 
     12# we're running the client version of the program 
     13PROGMODE="CLIENT" 
     14export PROGMODE 
    4615 
    47 ## ---- Check Java exists ---- 
    48 javapath= 
    49  
    50 # Some users may set the above line manually 
    51 if [ "x$javapath" = "x" ]; then 
    52  
    53     # If it is set, use the JAVA_HOME environment variable 
    54     if [ "x$JAVA_HOME" != "x" ]; then 
    55     javapath="$JAVA_HOME/bin/java" 
    56  
    57     # Check if Java is on the search path 
    58     else 
    59     javapath=`which java 2> /dev/null` 
    60     fi 
    61 fi 
    62  
    63 # Check that a Java executable has been found 
    64 if [ "$glilang" = "es" ]; then 
    65     echo "Revisando Java: $javapath" 
    66 elif [ "$glilang" = "fr" ]; then 
    67     echo "Vérification de Java: $javapath" 
    68 elif [ "$glilang" = "ru" ]; then 
    69     echo "ðÒÏ×ÅÒËÁ Java: $javapath" 
    70 else 
    71     echo "Checking Java: $javapath" 
    72 fi 
    73 if [ ! -x "$javapath" ]; then 
    74     echo 
    75     if [ "$glilang" = "es" ]; then 
    76     echo "No se pudo localizar una versión apropiada de Java. Usted deberá " 
    77     echo "instalar un Ambiente de Ejecución Java (versión 1.4 o superior) " 
    78     echo "antes de correr la Interfaz de la Biblioteca Digital Greenstone." 
    79     elif [ "$glilang" = "fr" ]; then 
    80     echo "Une version adéquate de Java n'a pas pu être localisée." 
    81     echo "Vous devez installer un Java Runtime Environment (version 1.4 ou" 
    82     echo "supérieur) avant de démarrer Greenstone Librarian Interface." 
    83     elif [ "$glilang" = "ru" ]; then 
    84     echo "îÅ ÕÄÁÌÏÓØ ÏÐÒÅÄÅÌÉÔØ ÍÅÓÔÏÎÁÈÏÖÄÅÎÉÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ×ÅÒÓÉÉ Java." 
    85     echo "÷Ù ÄÏÌÖÎÙ ÕÓÔÁÎÏ×ÉÔØ Java Runtime Environment (×ÅÒÓÉÀ 1.4 ÉÌÉ ×ÙÛÅ)" 
    86     echo "ÐÅÒÅÄ ××ÏÄÏÍ ÂÉÂÌÉÏÔÅÞÎÏÇÏ ÉÎÔÅÒÆÅÊÓÁ Greenstone." 
    87     else 
    88     echo "Failed to locate an appropriate version of Java. You must install a" 
    89     echo "Java Runtime Environment (version 1.4 or greater) before running the" 
    90     echo "Greenstone Librarian Interface." 
    91     fi 
    92     exit 1 
    93 fi 
    94  
    95  
    96 ## -- Check the version of Java is new enough (1.4.0 or higher) to run the GLI -- 
    97 `$javapath -classpath . CheckJavaVersion > /dev/null` 
    98 if [ $? -ne 2 ] ; then 
    99     echo 
    100     if [ "$glilang" = "es" ]; then 
    101     echo "La versión del Ambiente de Ejecución Java (JRE por sus siglas en " 
    102     echo "inglés) que usted tiene instalada es demasiado vieja para ejecutar " 
    103     echo "la Interfaz de la Biblioteca Digital Greenstone. Por favor instale " 
    104     echo "una nueva versión del Ambiente de Ejecución Java (versión 1.4 o " 
    105     echo "posterior) y ejecute nuevamente este guión." 
    106     elif [ "$glilang" = "fr" ]; then 
    107     echo "La version de Java Runtime Environment que vous avez installée est" 
    108     echo "trop vielle pour faire fonctionner Greenstone Librarian Interface." 
    109     echo "Veuillez installer une nouvelle version du JRE (version 1.4 ou plus" 
    110     echo "récente) et redémarrez le script." 
    111     elif [ "$glilang" = "ru" ]; then 
    112     echo "÷ÅÒÓÉÑ Java Runtime Environment, ËÏÔÏÒÕÀ ÷Ù ÕÓÔÁÎÏ×ÉÌÉ, ÏÞÅÎØ ÓÔÁÒÁ," 
    113     echo "ÞÔÏÂÙ ÕÐÒÁ×ÌÑÔØ ÂÉÂÌÉÏÔÅÞÎÙÍ ÉÎÔÅÒÆÅÊÓÏÍ Greenstone. ðÏÖÁÌÕÊÓÔÁ, " 
    114     echo "ÕÓÔÁÎÏ×ÉÔÅ ÎÏ×ÕÀ ×ÅÒÓÉÀ JRE (×ÅÒÓÉÀ 1.4 ÉÌÉ ÂÏÌÅÅ ÎÏ×ÕÀ) É" 
    115     echo "ÐÅÒÅÕÓÔÁÎÏ×ÉÔÅ ÜÔÏÔ ÓËÒÉÐÔ" 
    116     else 
    117     echo "The version of the Java Runtime Environment you have installed is too" 
    118     echo "old to run the Greenstone Librarian Interface. Please install a new" 
    119     echo "version of the JRE (version 1.4 or newer) and rerun this script." 
    120     fi 
    121     exit 1 
    122 fi 
    123  
    124 ## ---- Check that the GLI has been compiled ---- 
    125 if [ ! -f "classes/org/greenstone/gatherer/GathererProg.class" ] && [ ! -f "GLI.jar" ]; then 
    126     echo 
    127     if [ "$glilang" = "es" ]; then 
    128     echo "Usted necesita compilar la Interfaz de la Biblioteca Digital Greenstone" 
    129     echo "(por medio de makegli.sh) antes de ejecutar este guión." 
    130     elif [ "$glilang" = "fr" ]; then 
    131     echo "Vous devez compiler le Greenstone Interface (en utilisant makegli.sh)" 
    132     echo "avant d'exécuter ce script." 
    133     elif [ "$glilang" = "ru" ]; then 
    134     echo "÷Ù ÄÏÌÖÎÙ ËÏÍÐÉÌÉÒÏ×ÁÔØ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone" 
    135     echo "(ÉÓÐÏÌØÚÕÑ makegli.sh) ÐÅÒÅÄ ××ÏÄÏÍ ÜÔÏÇÏ ÓËÒÉÐÔÁ" 
    136     else 
    137     echo "You need to compile the Greenstone Librarian Interface (using makegli.sh)" 
    138     echo "before running this script." 
    139     fi 
    140     exit 1 
    141 fi 
    142  
    143  
    144 ## ---- Finally, run the GLI ---- 
    145 echo 
    146 if [ "$glilang" = "es" ]; then 
    147     echo "Ejecutando la Interfaz de la Biblioteca Digital Greenstone..." 
    148 elif [ "$glilang" = "fr" ]; then 
    149     echo "Exécution de Greenstone Librarian Interface" 
    150 elif [ "$glilang" = "ru" ]; then 
    151     echo "ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone..." 
    152 else 
    153     echo "Running the Greenstone Librarian Interface..." 
    154 fi 
    155  
    156 # Other arguments you can provide to GLI to work around memory limitations, or debug 
    157 # -Xms<number>M    To set minimum memory (by default 32MB) 
    158 # -Xmx<number>M    To set maximum memory (by default the nearest 2^n to the total remaining physical memory) 
    159 # -verbose:gc      To set garbage collection messages 
    160 # -Xincgc          For incremental garbage collection (significantly slows performance) 
    161 # -Xprof           Function call profiling 
    162 # -Xloggc:<file>   Write garbage collection log 
    163  
    164 $javapath -Xmx128M -classpath classes/:GLI.jar:lib/apache.jar:lib/qfslib.jar org.greenstone.gatherer.GathererProg       \ 
    165       -fedora_home /research/local/fedora2/ \ 
    166   -use_remote_greenstone $* 
    167  
    168  
    169  
    170 if [ "$glilang" = "es" ]; then 
    171     echo "¡Hecho!" 
    172 elif [ "$glilang" = "fr" ]; then 
    173     echo "Terminé!" 
    174 elif [ "$glilang" = "ru" ]; then 
    175     echo "÷ÙÐÏÌÎÅÎÏ!" 
    176 else 
    177     echo "Done!" 
    178 fi 
     16# run GLI in fedora mode 
     17./client-gli.sh -fedora $*