Changeset 7664


Ignore:
Timestamp:
2004-06-29T15:09:00+12:00 (20 years ago)
Author:
kjdon
Message:

added back in the wget tests for mirroring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/gli.sh

    r7317 r7664  
    231231fi
    232232
     233## ---- Check WGet exists ----
     234wgetpath=
     235
     236wok="NoWGet"
     237
     238# Some users may set the above line manually
     239if [ "$wgetpath" == "" ]; then
     240    # Check if WGet is on the search path
     241    wgetpath=`which wget 2> /dev/null`
     242fi
     243
     244# Check that a WGet executable has been found
     245echo "Checking WGet: $wgetpath"
     246if [ ! -x "$wgetpath" ]; then
     247    echo
     248    echo "Failed to locate an appropriate version of WGet. Web mirroring will"
     249    echo "be disabled. Greenstone Librarian Interface requires WGet installed"
     250    echo "in order to fully access this feature."
     251else
     252    ## -- Check the version of WGet is new enough (1.9 or higher) to run properly --
     253    wgetversion=`$wgetpath --version 2>&1 | sed -n 's/^GNU Wget \(.*\)/\1/p'`   
     254    wvmajor=`echo $wgetversion | sed -n 's/^\([0-9]*\).*$/\1/p'`
     255    wvminor=`echo $wgetversion | sed -n 's/^[0-9]*\.\(.*\)$/\1/p'`
     256
     257    wok="WGet1.9"
     258    if [ $wvmajor -lt 1 ] ; then
     259    wok="<WGet1.9"
     260    fi
     261    if [ $wvmajor -eq 1 ] && [ $wvminor -lt 9 ] ; then
     262    wok="<WGet1.9"
     263    fi
     264    if [ $wok == "<WGet1.9" ] ; then
     265    echo
     266    echo "The version of the WGet you have installed has a known bug when"
     267    echo "mirroring files which contain encoded characters such as space and"
     268    echo "tilde in their URL. While this shouldn't be a problem, we recommend"
     269        echo "installing WGet 1.9 or higher."
     270    fi
     271fi
     272
    233273## ---- Check that the GLI has been compiled ----
    234274if [ ! -f "classes/org/greenstone/gatherer/Gatherer.class" ] && [ ! -f "GLI.jar" ]; then
    235     echo
     275    echo
    236276    if [ "$glilang" == "es" ]; then
    237277    echo "Usted necesita compilar la Interfaz de la Biblioteca Digital Greenstone"
Note: See TracChangeset for help on using the changeset viewer.