From: Frank Lichtenheld Date: Sun, 9 Sep 2007 13:35:09 +0000 (+0200) Subject: cron.d/120synctrans: Allow overriding the server for downloading translations X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=dfad5cc970ad91704b0497311c3255673ca37b66;p=deb%2Fpackages.git cron.d/120synctrans: Allow overriding the server for downloading translations Suggested by Helge Kreutzmann Since the translations in the main Debian archive are still way outdated, use ddtp.debian.net for now. Make overriding $ddtp_ftpsite optional and fall back to $ftpsite automatically if no seperate $ddtp_ftpsite is defined. --- diff --git a/config.sh.sed.in b/config.sh.sed.in index aecefa9..73d6b47 100644 --- a/config.sh.sed.in +++ b/config.sh.sed.in @@ -31,6 +31,7 @@ volatile_ftpsite=http://volatile.debian.org/debian-volatile backports_ftpsite=http://backports.org/debian amd64_ftpsite=http://amd64.debian.net/debian gnuab_ftpsite=http://kfreebsd-gnu.debian.net/debian +ddtp_ftpsite=http://ddtp.debian.net/debian root="" diff --git a/cron.d/120synctrans b/cron.d/120synctrans index 12767ab..33c38be 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 @@ -17,7 +21,7 @@ then do echo retrieve translated Descs $dist/$part/$lang (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/Translations-$lang.gz) done done done