]> git.deb.at Git - deb/packages.git/blobdiff - cron.d/120synctrans
cron.d/120syntrans: retrieve DDTP descriptions again
[deb/packages.git] / cron.d / 120synctrans
diff --git a/cron.d/120synctrans b/cron.d/120synctrans
new file mode 100755 (executable)
index 0000000..add4c35
--- /dev/null
@@ -0,0 +1,39 @@
+#! /bin/sh
+
+. `dirname $0`/../config.sh
+
+test -d ${archivedir} || mkdir -p ${archivedir}
+cd ${archivedir}
+
+if [ -z "${localdir}" ]
+then
+    echo using remote mirror
+    for dist in unstable
+    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
+            (cd us/${dist}/${part}/i18n &&
+                wget -q -N ${ftpsite}/dists/${dist}/${part}/i18n/Translations-$lang.gz)
+         done
+       done
+    done
+else
+    echo using local mirror
+    for dist in unstable
+    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
+            rsync -t ${localdir}/dists/${dist}/${part}/i18n/Translation-$lang.gz \
+               us/${dist}/${part}/i18n/Translation-$lang.gz
+         done
+       done
+    done
+fi