]> git.deb.at Git - deb/packages.git/blob - cron.d/120synctrans
html/show.tmpl: Remove one hardcoded "Debian"
[deb/packages.git] / cron.d / 120synctrans
1 #! /bin/sh
2
3 . `dirname $0`/../config.sh
4
5 test -d ${archivedir} || mkdir -p ${archivedir}
6 cd ${archivedir}
7
8 if [ -z "${localdir}" ] || [ -n "$ddtp_ftpsite" ]
9 then
10     if [ -z "$ddtp_ftpsite" ]
11     then
12         ddtp_ftpsite="$ftpsite"
13     fi
14     echo using remote mirror $ddtp_ftpsite
15     for dist in $dists
16     do
17         for part in main
18         do
19           test -d us/${dist}/${part}/i18n || mkdir -p us/${dist}/${part}/i18n
20           for lang in $ddtplangs
21           do
22             locale=$(echo $lang|perl -p -e 's/^([a-z]{2})-([a-z]{2})$/"$1_".uc($2)/e')
23             echo "retrieve translated Descs $dist/$part/$lang ($locale)"
24             (cd us/${dist}/${part}/i18n &&
25                 $wget_cmd -N ${ddtp_ftpsite}/dists/${dist}/${part}/i18n/Translation-$locale.gz)
26           done
27         done
28     done
29 else
30     echo using local mirror
31     for dist in $dists
32     do
33         for part in main
34         do
35           test -d us/${dist}/${part}/i18n || mkdir -p us/${dist}/${part}/i18n
36           for lang in $ddtplangs
37           do
38             echo retrieve translated Descs $dist/$part/$lang
39             rsync -t ${localdir}/dists/${dist}/${part}/i18n/Translation-$lang.gz \
40                 us/${dist}/${part}/i18n/Translation-$lang.gz
41           done
42         done
43     done
44 fi