Changeset 12286


Ignore:
Timestamp:
2006-07-24T14:27:05+12:00 (18 years ago)
Author:
kjdon
Message:

Made this POSIX compliant (I think) based on patch sent in by James Strother.
changed [ a == b] to [a = b], = "" to = "x", removed popd and pushd.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/gli.sh

    r12225 r12286  
    33
    44echo
    5 if [ "$glilang" == "es" ]; then
     5if [ "$glilang" = "es" ]; then
    66    echo "Interfaz de la Biblioteca Digital Greenstone (Greenstone Librarian Interface - GLI)"
    77    echo "Copyright (C) 2005, New Zealand Digital Library Project, University Of Waikato"
     
    99    echo "Para mayor información vea los términos de la licencia en LICENSE.txt"
    1010    echo "Este es un software abierto, por lo que lo invitamos a que lo distribuya de forma gratuita"
    11 elif [ "$glilang" == "fr" ]; then
     11elif [ "$glilang" = "fr" ]; then
    1212    echo "Interface du Bibliothécaire Greenstone (Greenstone Librarian Interface - GLI)"
    1313    echo "Copyright (C) 2005, New Zealand Digital Library Project, University Of Waikato"
    1414    echo "GLI est fourni sans AUCUNE GARANTIE; pour des détails, voir LICENSE.txt"
    1515    echo "Ceci est un logiciel libre, et vous êtes invité à le redistribuer"
    16 elif [ "$glilang" == "ru" ]; then
     16elif [ "$glilang" = "ru" ]; then
    1717    echo "âÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone (Greenstone Librarian Interface - GLI)"
    1818    echo "Copyright (C) 2005, New Zealand Digital Library Project, University Of Waikato"
     
    3232thisdir=`pwd`
    3333if [ ! -f "${thisdir}/gli.sh" ]; then
    34     if [ "$glilang" == "es" ]; then
     34    if [ "$glilang" = "es" ]; then
    3535        echo "Este guión deberá ejecutarse desde el directorio en el que reside."
    36     elif [ "$glilang" == "fr" ]; then
     36    elif [ "$glilang" = "fr" ]; then
    3737    echo "Ce script doit être exécuté à partir du répertoire dans lequel il se trouve."
    38     elif [ "$glilang" == "ru" ]; then
     38    elif [ "$glilang" = "ru" ]; then
    3939    echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ"
    4040    else
     
    4949
    5050# Some users may set the above line manually
    51 if [ "$gsdlpath" == "" ]; then
     51if [ "x$gsdlpath" = "x" ]; then
    5252    # Check the environment variable first
    53     if [ "$GSDLHOME" != "" ]; then
     53    if [ "x$GSDLHOME" != "x" ]; then
    5454    gsdlpath=$GSDLHOME
    5555
    5656    # If it is not set, assume that the GLI is installed as a subdirectory of Greenstone
    5757    else
    58     pushd .. > /dev/null
    59     gsdlpath=`pwd`
    60     popd > /dev/null
     58    gsdlpath=`(cd .. && pwd)`
    6159    fi
    6260fi
    6361
    6462# Check that the Greenstone installation looks OK
    65 if [ "$glilang" == "es" ]; then
     63if [ "$glilang" = "es" ]; then
    6664    echo "Revisando GSDL: $gsdlpath"
    67 elif [ "$glilang" == "fr" ]; then
     65elif [ "$glilang" = "fr" ]; then
    6866    echo "Vérification de GSDL: $gsdlpath"
    69 elif [ "$glilang" == "ru" ]; then
     67elif [ "$glilang" = "ru" ]; then
    7068    echo "ðÒÏ×ÅÒËÁ GSDL: $gsdlpath"
    7169else
     
    7472if [ ! -f "${gsdlpath}/setup.bash" ] ; then
    7573    echo
    76     if [ "$glilang" == "es" ]; then
     74    if [ "$glilang" = "es" ]; then
    7775    echo "No se pudo encontrar la instalación de Greenstone o está incompleta."
    7876        echo "Trate de reinstalar Greenstone y a continuación ejecute nuevamente"
    7977    echo "este guión."
    80     elif [ "$glilang" == "fr" ]; then
     78    elif [ "$glilang" = "fr" ]; then
    8179    echo "L'installation de Greenstone est introuvable ou incomplète."
    8280    echo "Essayez de réinstaller Greenstone et exécutez ce script à nouveau."
    83     elif [ "$glilang" == "ru" ]; then
     81    elif [ "$glilang" = "ru" ]; then
    8482    echo "éÎÓÔÁÌÌÑÃÉÑ Greenstone ÎÅ ÂÙÌÁ ÎÁÊÄÅÎÁ ÉÌÉ ÏÎÁ ÎÅÐÏÌÎÁ."
    8583    echo "ðÏÐÒÏÂÕÊÔÅ ÐÏ×ÔÏÒÎÏ ÕÓÔÁÎÏ×ÉÔØ Greenstone, Á ÚÁÔÅÍ ××ÅÓÔÉ ÜÔÏÔ ÓËÒÉÐÔ ÓÎÏ×Á."
     
    9290
    9391# Setup Greenstone, unless it has already been done
    94 if [ "$GSDLHOME" == "" ]; then
    95     pushd "$gsdlpath" > /dev/null
    96     source setup.bash
    97     popd > /dev/null
     92if [ "x$GSDLHOME" = "x" ]; then
     93    cd "$gsdlpath"
     94    . setup.bash
     95    cd "$thisdir"
    9896fi
    9997
     
    103101
    104102# Some users may set the above line manually
    105 if [ "$perlpath" == "" ]; then
     103if [ "x$perlpath" = "x" ]; then
    106104    # Check if Perl is on the search path
    107105    perlpath=`which perl 2> /dev/null`
     
    109107
    110108# Check that a Perl executable has been found
    111 if [ "$glilang" == "es" ]; then
     109if [ "$glilang" = "es" ]; then
    112110    echo "Revisando Perl: $perlpath"
    113 elif [ "$glilang" == "fr" ]; then
     111elif [ "$glilang" = "fr" ]; then
    114112    echo "Vérification de Perl: $perlpath"
    115 elif [ "$glilang" == "ru" ]; then
     113elif [ "$glilang" = "ru" ]; then
    116114    echo "ðÒÏ×ÅÒËÁ Perl: $perlpath"
    117115else
     
    120118if [ ! -x "$perlpath" ] ; then
    121119    echo
    122     if [ "$glilang" == "es" ]; then
     120    if [ "$glilang" = "es" ]; then
    123121    echo "La Interfaz de la Biblioteca Digital Greenstone requiere Perl para "
    124122    echo "poder operar, pero éste no aparece en su sistema. Por favor asegúrese "
    125123    echo "de que Perl está instalado y se encuentra en su ruta de búsqueda. A "
    126124    echo "continuación ejecute nuevamente este guión."
    127     elif [ "$glilang" == "fr" ]; then
     125    elif [ "$glilang" = "fr" ]; then
    128126    echo "Greenstone Librarian Interface nécessite perl pour son fonctionnement,"
    129127    echo "mais perl n'a pas pu être détecté dans votre système. Veuillez vous "
    130128    echo "assurer que perl est installé et est spécifié dans votre chemin de "
    131129    echo "recherche, puis redémarrez ce script."
    132     elif [ "$glilang" == "ru" ]; then
     130    elif [ "$glilang" = "ru" ]; then
    133131    echo "âÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone ÔÒÅÂÕÅÔ Perl, ÞÔÏÂÙ ÉÍÅÔØ ×ÏÚÍÏÖÎÏÓÔØ"
    134132    echo "ÒÁÂÏÔÁÔØ, ÎÏ Perl ÎÅ ÂÙÌ × ×ÁÛÅÊ ÓÉÓÔÅÍÅ. ðÏÖÁÌÕÊÓÔÁ, ÐÏÄÔ×ÅÒÄÉÔÅ, ÞÔÏ "
     
    148146
    149147# Some users may set the above line manually
    150 if [ "$javapath" == "" ]; then
     148if [ "x$javapath" = "x" ]; then
    151149
    152150    # If it is set, use the JAVA_HOME environment variable
    153     if [ "$JAVA_HOME" != "" ]; then
     151    if [ "x$JAVA_HOME" != "x" ]; then
    154152    javapath="$JAVA_HOME/bin/java"
    155153
     
    161159
    162160# Check that a Java executable has been found
    163 if [ "$glilang" == "es" ]; then
     161if [ "$glilang" = "es" ]; then
    164162    echo "Revisando Java: $javapath"
    165 elif [ "$glilang" == "fr" ]; then
     163elif [ "$glilang" = "fr" ]; then
    166164    echo "Vérification de Java: $javapath"
    167 elif [ "$glilang" == "ru" ]; then
     165elif [ "$glilang" = "ru" ]; then
    168166    echo "ðÒÏ×ÅÒËÁ Java: $javapath"
    169167else
     
    172170if [ ! -x "$javapath" ]; then
    173171    echo
    174     if [ "$glilang" == "es" ]; then
     172    if [ "$glilang" = "es" ]; then
    175173    echo "No se pudo localizar una versión apropiada de Java. Usted deberá "
    176174    echo "instalar un Ambiente de Ejecución Java (versión 1.4 o superior) "
    177175    echo "antes de correr la Interfaz de la Biblioteca Digital Greenstone."
    178     elif [ "$glilang" == "fr" ]; then
     176    elif [ "$glilang" = "fr" ]; then
    179177    echo "Une version adéquate de Java n'a pas pu être localisée."
    180178    echo "Vous devez installer un Java Runtime Environment (version 1.4 ou"
    181179    echo "supérieur) avant de démarrer Greenstone Librarian Interface."
    182     elif [ "$glilang" == "ru" ]; then
     180    elif [ "$glilang" = "ru" ]; then
    183181    echo "îÅ ÕÄÁÌÏÓØ ÏÐÒÅÄÅÌÉÔØ ÍÅÓÔÏÎÁÈÏÖÄÅÎÉÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ×ÅÒÓÉÉ Java."
    184182    echo "÷Ù ÄÏÌÖÎÙ ÕÓÔÁÎÏ×ÉÔØ Java Runtime Environment (×ÅÒÓÉÀ 1.4 ÉÌÉ ×ÙÛÅ)"
     
    197195if [ $? -ne 2 ] ; then
    198196    echo
    199     if [ "$glilang" == "es" ]; then
     197    if [ "$glilang" = "es" ]; then
    200198    echo "La versión del Ambiente de Ejecución Java (JRE por sus siglas en "
    201199    echo "inglés) que usted tiene instalada es demasiado vieja para ejecutar "
     
    203201    echo "una nueva versión del Ambiente de Ejecución Java (versión 1.4 o "
    204202    echo "posterior) y ejecute nuevamente este guión."
    205     elif [ "$glilang" == "fr" ]; then
     203    elif [ "$glilang" = "fr" ]; then
    206204    echo "La version de Java Runtime Environment que vous avez installée est"
    207205    echo "trop vielle pour faire fonctionner Greenstone Librarian Interface."
    208206    echo "Veuillez installer une nouvelle version du JRE (version 1.4 ou plus"
    209207    echo "récente) et redémarrez le script."
    210     elif [ "$glilang" == "ru" ]; then
     208    elif [ "$glilang" = "ru" ]; then
    211209    echo "÷ÅÒÓÉÑ Java Runtime Environment, ËÏÔÏÒÕÀ ÷Ù ÕÓÔÁÎÏ×ÉÌÉ, ÏÞÅÎØ ÓÔÁÒÁ,"
    212210    echo "ÞÔÏÂÙ ÕÐÒÁ×ÌÑÔØ ÂÉÂÌÉÏÔÅÞÎÙÍ ÉÎÔÅÒÆÅÊÓÏÍ Greenstone. ðÏÖÁÌÕÊÓÔÁ, "
     
    227225if [ ! -f "classes/org/greenstone/gatherer/GathererProg.class" ] && [ ! -f "GLI.jar" ]; then
    228226    echo
    229     if [ "$glilang" == "es" ]; then
     227    if [ "$glilang" = "es" ]; then
    230228    echo "Usted necesita compilar la Interfaz de la Biblioteca Digital Greenstone"
    231229    echo "(por medio de makegli.sh) antes de ejecutar este guión."
    232     elif [ "$glilang" == "fr" ]; then
     230    elif [ "$glilang" = "fr" ]; then
    233231    echo "Vous devez compiler le Greenstone Interface (en utilisant makegli.sh)"
    234232    echo "avant d'exécuter ce script."
    235     elif [ "$glilang" == "ru" ]; then
     233    elif [ "$glilang" = "ru" ]; then
    236234    echo "÷Ù ÄÏÌÖÎÙ ËÏÍÐÉÌÉÒÏ×ÁÔØ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone"
    237235    echo "(ÉÓÐÏÌØÚÕÑ makegli.sh) ÐÅÒÅÄ ××ÏÄÏÍ ÜÔÏÇÏ ÓËÒÉÐÔÁ"
     
    245243## ---- Finally, run the GLI ----
    246244echo
    247 if [ "$glilang" == "es" ]; then
     245if [ "$glilang" = "es" ]; then
    248246    echo "Ejecutando la Interfaz de la Biblioteca Digital Greenstone..."
    249 elif [ "$glilang" == "fr" ]; then
     247elif [ "$glilang" = "fr" ]; then
    250248    echo "Exécution de Greenstone Librarian Interface"
    251 elif [ "$glilang" == "ru" ]; then
     249elif [ "$glilang" = "ru" ]; then
    252250    echo "ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone..."
    253251else
     
    275273  else
    276274    echo
    277     if [ "$glilang" == "es" ]; then
     275    if [ "$glilang" = "es" ]; then
    278276        echo "Restarting/Ejecutando la Interfaz de la Biblioteca Digital Greenstone..."
    279     elif [ "$glilang" == "fr" ]; then
     277    elif [ "$glilang" = "fr" ]; then
    280278        echo "Restarting/Exécution de Greenstone Librarian Interface"
    281     elif [ "$glilang" == "ru" ]; then
     279    elif [ "$glilang" = "ru" ]; then
    282280        echo "Restarting/ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone..."
    283281    else
     
    288286done
    289287
    290 if [ "$glilang" == "es" ]; then
     288if [ "$glilang" = "es" ]; then
    291289    echo "¡Hecho!"
    292 elif [ "$glilang" == "fr" ]; then
     290elif [ "$glilang" = "fr" ]; then
    293291    echo "Terminé!"
    294 elif [ "$glilang" == "ru" ]; then
     292elif [ "$glilang" = "ru" ]; then
    295293    echo "÷ÙÐÏÌÎÅÎÏ!"
    296294else
Note: See TracChangeset for help on using the changeset viewer.