X-Git-Url: https://git.deb.at/?p=deb%2Fpackages.git;a=blobdiff_plain;f=cron.d%2F120synctrans;h=437aa921d9cdf0332ee99c8dc4a6eeba2c031a16;hp=12767abce8ae8a68fb25a6f98dd03f73cb588808;hb=a3fd68e78cd0c1eb1dbff6b48accaca5b2b54637;hpb=ee72025828634d9ebfbe2ab4a75849a3409d87da diff --git a/cron.d/120synctrans b/cron.d/120synctrans index 12767ab..437aa92 100755 --- a/cron.d/120synctrans +++ b/cron.d/120synctrans @@ -5,9 +5,13 @@ test -d ${archivedir} || mkdir -p ${archivedir} cd ${archivedir} -if [ -z "${localdir}" ] +if [ -z "${localdir}" ] || [ -n "$ddtp_ftpsite" ] then - echo using remote mirror + if [ -z "$ddtp_ftpsite" ] + then + ddtp_ftpsite="$ftpsite" + fi + echo using remote mirror $ddtp_ftpsite for dist in sid do for part in main @@ -15,9 +19,10 @@ then test -d us/${dist}/${part}/i18n || mkdir -p us/${dist}/${part}/i18n for lang in $ddtplangs do - echo retrieve translated Descs $dist/$part/$lang + locale=$(echo $lang|perl -p -e 's/^([a-z]{2})-([a-z]{2})$/"$1_".uc($2)/e') + echo "retrieve translated Descs $dist/$part/$lang ($locale)" (cd us/${dist}/${part}/i18n && - wget -q -N ${ftpsite}/dists/${dist}/${part}/i18n/Translations-$lang.gz) + wget -q -N ${ddtp_ftpsite}/dists/${dist}/${part}/i18n/Translation-$locale.gz) done done done