X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=cron.d%2F120synctrans;h=07511f80e8f528f9f6dd4e43ba2a9916d6e1d081;hb=baa8438e062c040b6d142bcf36961b95841c0069;hp=12767abce8ae8a68fb25a6f98dd03f73cb588808;hpb=ee72025828634d9ebfbe2ab4a75849a3409d87da;p=deb%2Fpackages.git diff --git a/cron.d/120synctrans b/cron.d/120synctrans index 12767ab..07511f8 100755 --- a/cron.d/120synctrans +++ b/cron.d/120synctrans @@ -5,25 +5,30 @@ test -d ${archivedir} || mkdir -p ${archivedir} cd ${archivedir} -if [ -z "${localdir}" ] +if [ -z "${localdir}" ] || [ -n "$ddtp_ftpsite" ] then - echo using remote mirror - for dist in sid + if [ -z "$ddtp_ftpsite" ] + then + ddtp_ftpsite="$ftpsite" + fi + echo using remote mirror $ddtp_ftpsite + for dist in $dists do for part in main do 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_cmd -N ${ddtp_ftpsite}/dists/${dist}/${part}/i18n/Translation-$locale.gz) done done done else echo using local mirror - for dist in sid + for dist in $dists do for part in main do