]> git.deb.at Git - deb/packages.git/blob - cron.d/100syncarchive_installer
Update to 467t,0f,209u
[deb/packages.git] / cron.d / 100syncarchive_installer
1 #! /bin/bash
2
3 . `dirname $0`/../config.sh
4
5 test -d ${archivedir} || mkdir -p ${archivedir}
6 cd ${archivedir}
7
8 # Main archive
9 #
10 if [ -z "${localdir}" ]
11 then
12     echo using remote mirror
13     for dist in ${dists}
14     do
15
16       if [ $dist = experimental ]; then
17           continue
18       fi
19
20         foo=\$arch_${dist//-/_}
21         for arch in `eval echo $foo`
22         do
23             for part in "main/debian-installer"
24             do
25                 echo retrieve Packages $dist/$part/$arch
26                 test -d us/${dist}/${part}/binary-${arch} || mkdir -p us/${dist}/${part}/binary-${arch}
27                 (cd us/${dist}/${part}/binary-${arch} &&
28                     wget -q -N ${ftpsite}/dists/${dist}/${part}/binary-${arch}/Packages.gz)
29             done
30         done
31     done
32 else
33     echo using local mirror
34     for dist in ${dists}
35     do
36
37       if [ $dist = experimental ]; then
38           continue
39       fi
40
41         foo=\$arch_${dist//-/_}
42         for arch in `eval echo $foo`
43         do
44             for part in "main/debian-installer"
45             do
46                 echo retrieve Sources $dist/$part/$arch
47                 test -d us/${dist}/${part}/binary-${arch} || mkdir -p us/${dist}/${part}/binary-${arch}
48                 rsync -t ${localdir}/dists/${dist}/${part}/binary-${arch}/Packages.gz \
49                     us/${dist}/${part}/binary-${arch}/Packages.gz
50             done
51         done
52     done
53 fi