From dfad5cc970ad91704b0497311c3255673ca37b66 Mon Sep 17 00:00:00 2001 From: Frank Lichtenheld Date: Sun, 9 Sep 2007 15:35:09 +0200 Subject: [PATCH] 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. --- config.sh.sed.in | 1 + cron.d/120synctrans | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) 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 -- 2.39.2