Author: humdinger Date: 2011-11-05 11:35:46 +0100 (Sat, 05 Nov 2011) New Revision: 43192 Changeset: https://dev.haiku-os.org/changeset/43192 Modified: haiku/trunk/src/tools/hta_committer.sh Log: A little hack for the script that pulls catkeys from the HTA site. It corrects the confusion of 'zh-hans' vs.'zh_hans' until the catkeys at HTA are correctly found under 'zh_hans'. Modified: haiku/trunk/src/tools/hta_committer.sh =================================================================== --- haiku/trunk/src/tools/hta_committer.sh 2011-11-04 19:23:34 UTC (rev 43191) +++ haiku/trunk/src/tools/hta_committer.sh 2011-11-05 10:35:46 UTC (rev 43192) @@ -115,31 +115,37 @@ DownloadLanguageTarball() { + LANGUAGE=$1 + # The package for zh_hans catalogs is actually called zh-hans + if [ "$LANGUAGE" = "zh_hans" ] ; then + LANGUAGE="zh-hans" + fi + cd "$tempDirectory" - echo "Downloading language: $1" + echo "Downloading language: $LANGUAGE" - if [ -e "$1.tgz" ] ; then - rm "$1.tgz" + if [ -e "$LANGUAGE.tgz" ] ; then + rm "$LANGUAGE.tgz" fi attempt=0 local tarballURL="http://hta.polytect.org/catalogs/tarball"; - while [ $(wget -nv -U hta_committer -O "$1.tgz" "$tarballURL/$1" ; echo $?) -ne 0 ]; do + while [ $(wget -nv -U hta_committer -O "$LANGUAGE.tgz" "$tarballURL/$LANGUAGE" ; echo $?) -ne 0 ]; do if [ $attempt -eq 5 ]; then break fi (( attempt++ )) echo "Download attempt #$attempt failed. Retrying ..." - if [ -e "$1" ]; then - rm "$1" + if [ -e "$LANGUAGE" ]; then + rm "$LANGUAGE" fi done if [ $attempt -ge 5 ]; then - if [ -e "$1" ]; then - rm "$1" + if [ -e "$LANGUAGE" ]; then + rm "$LANGUAGE" fi - echo "WARNING: Max download retries exceeded for language $1." + echo "WARNING: Max download retries exceeded for language $LANGUAGE." fi cd "$subversionRootDirectory"