From a94afff898ef6630b66a0fe24026aaeb8576421e Mon Sep 17 00:00:00 2001 From: Joachim Seemer Date: Sat, 5 Nov 2011 10:35:46 +0000 Subject: [PATCH] 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'. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43192 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tools/hta_committer.sh | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/src/tools/hta_committer.sh b/src/tools/hta_committer.sh index b151575d6e..ed27ef1ed9 100755 --- a/src/tools/hta_committer.sh +++ b/src/tools/hta_committer.sh @@ -115,31 +115,37 @@ DownloadAllLanguageTarballs() 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"