Changeset 6702 for trunk/gli/gli.sh


Ignore:
Timestamp:
2004-02-03T12:28:09+13:00 (20 years ago)
Author:
mdewsnip
Message:

Now with Russian strings!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/gli.sh

    r6670 r6702  
    11#!/bin/sh
     2glilang=
    23
    34echo
    4 echo 'Greenstone Librarian Interface (GLI)'
    5 echo 'Copyright (C) 2004, New Zealand Digital Library Project, University Of Waikato'
    6 echo 'GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt'
    7 echo 'This is free software, and you are welcome to redistribute it'
     5if [ "$glilang" == "ru" ]; then
     6else
     7    echo 'Greenstone Librarian Interface (GLI)'
     8    echo 'Copyright (C) 2004, New Zealand Digital Library Project, University Of Waikato'
     9    echo 'GLI comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt'
     10    echo 'This is free software, and you are welcome to redistribute it'
     11fi
    812echo
    913
     
    1317thisdir=`pwd`
    1418if [ ! -f "${thisdir}/gli.sh" ]; then
    15     echo "This script must be run from the directory in which it resides."
     19    if [ "$glilang" == "ru" ]; then
     20    echo "üÔÏÔ ÓËÒÉÐÔ ÄÏÌÖÅÎ ÂÙÔØ ×ÚÑÔ ÉÚ ÄÉÒÅËÔÏÒÉÉ, × ËÏÔÏÒÏÊ ÏÎ ÒÁÓÐÏÌÏÖÅÎ"
     21    else
     22    echo "This script must be run from the directory in which it resides."
     23    fi
    1624    exit 1
    1725fi
     
    3644
    3745# Check that the Greenstone installation looks OK
    38 echo "Checking GSDL: $gsdlpath"
     46if [ "$glilang" == "ru" ]; then
     47    echo "ðÒÏ×ÅÒËÁ GSDL: $gsdlpath"
     48else
     49    echo "Checking GSDL: $gsdlpath"
     50fi
    3951if [ ! -f "${gsdlpath}/setup.bash" ] ; then
    4052    echo
    41     echo "The Greenstone installation could not be found, or is incomplete."
    42     echo "Try reinstalling Greenstone then running this script again."
     53    if [ "$glilang" == "ru" ]; then
     54    echo "éÎÓÔÁÌÌÑÃÉÑ Greenstone ÎÅ ÂÙÌÁ ÎÁÊÄÅÎÁ ÉÌÉ ÏÎÁ ÎÅÐÏÌÎÁ."
     55    echo "ðÏÐÒÏÂÕÊÔÅ ÐÏ×ÔÏÒÎÏ ÕÓÔÁÎÏ×ÉÔØ Greenstone, Á ÚÁÔÅÍ ××ÅÓÔÉ ÜÔÏÔ ÓËÒÉÐÔ ÓÎÏ×Á."
     56    else
     57    echo "The Greenstone installation could not be found, or is incomplete."
     58    echo "Try reinstalling Greenstone then running this script again."
     59    fi
    4360    exit 1
    4461fi
     
    6279
    6380# Check that a Perl executable has been found
    64 echo "Checking Perl: $perlpath"
     81if [ "$glilang" == "ru" ]; then
     82    echo "ðÒÏ×ÅÒËÁ Perl: $perlpath"
     83else
     84    echo "Checking Perl: $perlpath"
     85fi
    6586if [ ! -x "$perlpath" ] ; then
    6687    echo
    67     echo "The Greenstone Librarian Interface requires perl in order to operate,"
    68     echo "but perl could not be detected on your system. Please ensure that perl"
    69     echo "is installed and is on your search path, then rerun this script."
     88    if [ "$glilang" == "ru" ]; then
     89    echo "âÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone ÔÒÅÂÕÅÔ Perl, ÞÔÏÂÙ ÉÍÅÔØ ×ÏÚÍÏÖÎÏÓÔØ"
     90    echo "ÒÁÂÏÔÁÔØ, ÎÏ Perl ÎÅ ÂÙÌ × ×ÁÛÅÊ ÓÉÓÔÅÍÅ. ðÏÖÁÌÕÊÓÔÁ, ÐÏÄÔ×ÅÒÄÉÔÅ, ÞÔÏ "
     91    echo "Perl ÕÓÔÁÎÏ×ÌÅÎ É ÎÁÈÏÄÉÔÓÑ ÎÁ ×ÁÛÅÍ ÐÕÔÉ ÐÏÉÓËÁ, ÚÁÔÅÍ ÐÏ×ÔÏÒÎÏ××ÅÄÉÔÅ"
     92    echo "ÜÔÏÔ ÓËÒÉÐÔ."
     93    else
     94    echo "The Greenstone Librarian Interface requires perl in order to operate,"
     95    echo "but perl could not be detected on your system. Please ensure that perl"
     96    echo "is installed and is on your search path, then rerun this script."
     97    fi
    7098    exit 1
    7199fi
     
    89117
    90118# Check that a Java executable has been found
    91 echo "Checking Java: $javapath"
     119if [ "$glilang" == "ru" ]; then
     120    echo "ðÒÏ×ÅÒËÁ Java: $javapath"
     121else
     122    echo "Checking Java: $javapath"
     123fi
    92124if [ ! -x "$javapath" ]; then
    93125    echo
    94     echo "Failed to locate an appropriate version of Java. You must install a"
    95     echo "Java Runtime Environment (version 1.4 or greater) before running the"
    96     echo "Greenstone Librarian Interface."
     126    if [ "$glilang" == "ru" ]; then
     127    echo "îÅ ÕÄÁÌÏÓØ ÏÐÒÅÄÅÌÉÔØ ÍÅÓÔÏÎÁÈÏÖÄÅÎÉÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÅÊ ×ÅÒÓÉÉ Java."
     128    echo "÷Ù ÄÏÌÖÎÙ ÕÓÔÁÎÏ×ÉÔØ Java Runtime Environment (×ÅÒÓÉÀ 1.4 ÉÌÉ ×ÙÛÅ)"
     129    echo "ÐÅÒÅÄ ××ÏÄÏÍ ÂÉÂÌÉÏÔÅÞÎÏÇÏ ÉÎÔÅÒÆÅÊÓÁ Greenstone."
     130    else
     131    echo "Failed to locate an appropriate version of Java. You must install a"
     132    echo "Java Runtime Environment (version 1.4 or greater) before running the"
     133    echo "Greenstone Librarian Interface."
     134    fi
    97135    exit 1
    98136fi
     
    113151if [ $jok -eq 0 ] ; then
    114152    echo
    115     echo "The version of the Java Runtime Environment you have installed is too"
    116     echo "old to run the Greenstone Librarian Interface. Please install a new"
    117     echo "version of the JRE (version 1.4 or newer) and rerun this script."
    118     exit 1
    119 fi
    120 
    121 ## ---- Check WGet exists ----
    122 wgetpath=
    123 
    124 wok="NoWGet"
    125 
    126 # Commented out until after UNESCO release
    127 # Some users may set the above line manually
    128 #if [ "$wgetpath" == "" ]; then
    129 #    # Check if WGet is on the search path
    130 #    wgetpath=`which wget 2> /dev/null`
    131 #fi
    132 
    133 # Check that a WGet executable has been found
    134 #echo "Checking WGet: $wgetpath"
    135 #if [ ! -x "$wgetpath" ]; then
    136 #    echo
    137 #    echo "Failed to locate an appropriate version of WGet. Web mirroring will"
    138 #    echo "be disabled. Greenstone Librarian Interface requires WGet installed"
    139 #    echo "in order to fully access this feature."
    140 #else
    141     ## -- Check the version of WGet is new enough (1.9 or higher) to run properly --
    142 #    wgetversion=`$wgetpath --version 2>&1 | sed -n 's/^GNU Wget \(.*\)/\1/p'`   
    143 #    wvmajor=`echo $wgetversion | sed -n 's/^\([0-9]*\).*$/\1/p'`
    144 #    wvminor=`echo $wgetversion | sed -n 's/^[0-9]*\.\(.*\)$/\1/p'`
    145 
    146 #    wok="WGet1.9"
    147 #    if [ $wvmajor -lt 1 ] ; then
    148 #   wok="<WGet1.9"
    149 #    fi
    150 #    if [ $wvmajor -eq 1 ] && [ $wvminor -lt 9 ] ; then
    151 #   wok="<WGet1.9"
    152 #    fi
    153 #    if [ $wok == "<WGet1.9" ] ; then
    154 #   echo
    155 #   echo "The version of the WGet you have installed has a known bug when"
    156 #   echo "mirroring files which contain encoded characters such as space and"
    157 #   echo "tilde in their URL. While this shouldn't be a problem, we recommend"
    158 #        echo "installing WGet 1.9 or higher."
    159 #    fi
    160 #fi
     153    if [ "$glilang" == "ru" ]; then
     154    echo "÷ÅÒÓÉÑ Java Runtime Environment, ËÏÔÏÒÕÀ ÷Ù ÕÓÔÁÎÏ×ÉÌÉ, ÏÞÅÎØ ÓÔÁÒÁ,"
     155    echo "ÞÔÏÂÙ ÕÐÒÁ×ÌÑÔØ ÂÉÂÌÉÏÔÅÞÎÙÍ ÉÎÔÅÒÆÅÊÓÏÍ Greenstone. ðÏÖÁÌÕÊÓÔÁ, "
     156    echo "ÕÓÔÁÎÏ×ÉÔÅ ÎÏ×ÕÀ ×ÅÒÓÉÀ JRE (×ÅÒÓÉÀ 1.4 ÉÌÉ ÂÏÌÅÅ ÎÏ×ÕÀ) É"
     157    echo "ÐÅÒÅÕÓÔÁÎÏ×ÉÔÅ ÜÔÏÔ ÓËÒÉÐÔ"
     158    else
     159    echo "The version of the Java Runtime Environment you have installed is too"
     160    echo "old to run the Greenstone Librarian Interface. Please install a new"
     161    echo "version of the JRE (version 1.4 or newer) and rerun this script."
     162    fi
     163    exit 1
     164fi
    161165
    162166## ---- Check that the GLI has been compiled ----
    163167if [ ! -f "classes/org/greenstone/gatherer/Gatherer.class" ] && [ ! -f "GLI.jar" ]; then
    164168    echo
    165     echo "You need to compile the Greenstone Librarian Interface (using makegli.sh)"
    166     echo "before running this script."
     169    if [ "$glilang" == "ru" ]; then
     170    echo "÷Ù ÄÏÌÖÎÙ ËÏÍÐÉÌÉÒÏ×ÁÔØ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone"
     171    echo "(ÉÓÐÏÌØÚÕÑ makegli.sh) ÐÅÒÅÄ ××ÏÄÏÍ ÜÔÏÇÏ ÓËÒÉÐÔÁ"
     172    else
     173    echo "You need to compile the Greenstone Librarian Interface (using makegli.sh)"
     174    echo "before running this script."
     175    fi
    167176    exit 1
    168177fi
    169178
    170179if [ "$1" == "-test" ]; then
    171     echo "Testing class: $2"
    172     echo "arguments $*"
     180    if [ "$glilang" == "ru" ]; then
     181    else
     182    echo "Testing class: $2"
     183    echo "arguments $*"
     184    fi
    173185    java -classpath classes/:GLI.jar:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar $2 $3
    174     exit 1
     186    exit 0
    175187fi
    176188
    177189## ---- Finally, run the GLI ----
    178190echo
    179 echo "Running the Greenstone Librarian Interface..."
     191if [ "$glilang" == "ru" ]; then
     192    echo "ôÅËÕÝÉÊ ÂÉÂÌÉÏÔÅÞÎÙÊ ÉÎÔÅÒÆÅÊÓ Greenstone..."
     193else
     194    echo "Running the Greenstone Librarian Interface..."
     195fi
    180196
    181197# Other arguments you can provide to GLI to work around memory limitations, or debug
     
    189205java -classpath classes/:GLI.jar:lib/apache.jar:lib/calpa.jar:lib/jp.jar:lib/polloxml.jar:lib/qfslib.jar:lib/skinlf.jar org.greenstone.gatherer.Gatherer -gsdl $GSDLHOME -wget $wok$wgetpath $*
    190206
    191 echo "Done!"
     207if [ "$glilang" == "ru" ]; then
     208    echo "÷ÙÐÏÌÎÅÎÏ!"
     209else
     210    echo "Done!"
     211fi
Note: See TracChangeset for help on using the changeset viewer.