]> git.deb.at Git - deb/packages.git/blob - 120synctrans
b97659eefb2bcba8fa273de669fda1431f114fbf
[deb/packages.git] / 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.bz2)
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             locale=$(echo $lang|perl -p -e 's/^([a-z]{2})-([a-z]{2})$/"$1_".uc($2)/e')
39             echo "retrieve translated Descs $dist/$part/$lang ($locale)"
40             rsync -Lt ${localdir}/dists/${dist}/${part}/i18n/Translation-$locale.bz2 \
41                 us/${dist}/${part}/i18n/Translation-$locale.bz2
42           done
43         done
44     done
45 fi
46
47 exit 0