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
This commit is contained in:
@@ -115,31 +115,37 @@ DownloadAllLanguageTarballs()
|
|||||||
|
|
||||||
DownloadLanguageTarball()
|
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"
|
cd "$tempDirectory"
|
||||||
echo "Downloading language: $1"
|
echo "Downloading language: $LANGUAGE"
|
||||||
|
|
||||||
if [ -e "$1.tgz" ] ; then
|
if [ -e "$LANGUAGE.tgz" ] ; then
|
||||||
rm "$1.tgz"
|
rm "$LANGUAGE.tgz"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
attempt=0
|
attempt=0
|
||||||
local tarballURL="http://hta.polytect.org/catalogs/tarball"
|
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
|
if [ $attempt -eq 5 ]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
(( attempt++ ))
|
(( attempt++ ))
|
||||||
echo "Download attempt #$attempt failed. Retrying ..."
|
echo "Download attempt #$attempt failed. Retrying ..."
|
||||||
if [ -e "$1" ]; then
|
if [ -e "$LANGUAGE" ]; then
|
||||||
rm "$1"
|
rm "$LANGUAGE"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ $attempt -ge 5 ]; then
|
if [ $attempt -ge 5 ]; then
|
||||||
if [ -e "$1" ]; then
|
if [ -e "$LANGUAGE" ]; then
|
||||||
rm "$1"
|
rm "$LANGUAGE"
|
||||||
fi
|
fi
|
||||||
echo "WARNING: Max download retries exceeded for language $1."
|
echo "WARNING: Max download retries exceeded for language $LANGUAGE."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "$subversionRootDirectory"
|
cd "$subversionRootDirectory"
|
||||||
|
|||||||
Reference in New Issue
Block a user