Ticket #7589: hta_committer.diff

File hta_committer.diff, 1.4 KB (added by humdinger, 13 years ago)

diff to always get "zh-hans" catalog-package

  • src/tools/hta_committer.sh

     
    115115
    116116DownloadLanguageTarball()
    117117{
     118    LANGUAGE=$1
     119    # The package for zh_hans catalogs is actually called zh-hans
     120    if [ "$LANGUAGE" = "zh_hans" ] ; then
     121        LANGUAGE="zh-hans"
     122    fi
     123   
    118124    cd "$tempDirectory"
    119     echo "Downloading language:  $1"
     125    echo "Downloading language:  $LANGUAGE"
    120126
    121     if [ -e "$1.tgz" ] ; then
    122         rm "$1.tgz"
     127    if [ -e "$LANGUAGE.tgz" ] ; then
     128        rm "$LANGUAGE.tgz"
    123129    fi 
    124130   
    125131    attempt=0
    126132    local tarballURL="http://hta.polytect.org/catalogs/tarball"
    127133   
    128     while [ $(wget -nv -U hta_committer -O "$1.tgz" "$tarballURL/$1" ; echo $?) -ne 0 ]; do
     134    while [ $(wget -nv -U hta_committer -O "$LANGUAGE.tgz" "$tarballURL/$LANGUAGE" ; echo $?) -ne 0 ]; do
    129135        if [ $attempt -eq 5 ]; then
    130136            break
    131137        fi
    132138        (( attempt++ ))
    133139        echo "Download attempt #$attempt failed. Retrying ..."
    134         if [ -e "$1" ]; then
    135             rm "$1"
     140        if [ -e "$LANGUAGE" ]; then
     141            rm "$LANGUAGE"
    136142        fi
    137143    done
    138144    if [ $attempt -ge 5 ]; then
    139         if [ -e "$1" ]; then
    140             rm "$1"
     145        if [ -e "$LANGUAGE" ]; then
     146            rm "$LANGUAGE"
    141147        fi
    142         echo "WARNING: Max download retries exceeded for language $1."
     148        echo "WARNING: Max download retries exceeded for language $LANGUAGE."
    143149    fi
    144150       
    145151    cd "$subversionRootDirectory"