]> git.deb.at Git - deb/packages.git/blob - cron.d/100syncarchive_installer
Merge branch 'master' into debian-master
[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         foo=\$arch_${dist//-/_}
17         for arch in `eval echo $foo`
18         do
19             for part in $parts
20             do
21                 part="$part/debian-installer"
22                 echo retrieve Packages $dist/$part/$arch
23                 test -d us/${dist}/${part}/binary-${arch} || mkdir -p us/${dist}/${part}/binary-${arch}
24                 (cd us/${dist}/${part}/binary-${arch} &&
25                     $wget_cmd -N ${ftpsite}/dists/${dist}/${part}/binary-${arch}/Packages.gz)
26             done
27         done
28
29         $check_release_cmd $archivedir/us/${dist}/Release
30     done
31 else
32     echo using local mirror
33     for dist in ${dists}
34     do
35
36         foo=\$arch_${dist//-/_}
37         for arch in `eval echo $foo`
38         do
39             for part in $parts
40             do
41                 part="$part/debian-installer"
42                 echo retrieve Sources $dist/$part/$arch
43                 test -d us/${dist}/${part}/binary-${arch} || mkdir -p us/${dist}/${part}/binary-${arch}
44                 rsync -Lt ${localdir}/dists/${dist}/${part}/binary-${arch}/Packages.gz \
45                     us/${dist}/${part}/binary-${arch}/Packages.gz
46             done
47         done
48
49         $check_release_cmd $archivedir/us/${dist}/Release
50     done
51 fi