]> git.deb.at Git - deb/packages.git/blob - cron.d/100syncarchive
add armhf from debian-ports (closes: #633058)
[deb/packages.git] / cron.d / 100syncarchive
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         echo "retrieve Release(.gpg) $dist"
16         test -d us/${dist} || mkdir -p us/${dist}
17         (cd us/${dist} &&
18             $wget_cmd -N ${ftpsite}/dists/${dist}/Release &&
19             $wget_cmd -N ${ftpsite}/dists/${dist}/Release.gpg )
20         
21         foo=\$arch_${dist//-/_}
22         for arch in `eval echo $foo`
23         do
24             for part in ${parts}
25             do
26                 echo retrieve Packages $dist/$part/$arch
27                 test -d us/${dist}/${part}/binary-${arch} || mkdir -p us/${dist}/${part}/binary-${arch}
28                 (cd us/${dist}/${part}/binary-${arch} &&
29                     $wget_cmd -N ${ftpsite}/dists/${dist}/${part}/binary-${arch}/Packages.gz)
30             done
31             #FIXME: no Contents files for p-u
32             echo retrieve Contents $dist/$arch
33             (cd us/${dist} &&
34                 $wget_cmd -N ${ftpsite}/dists/${dist}/Contents-${arch}.gz)
35         done
36         for part in ${parts}
37         do
38             echo retrieve Sources $dist/$part
39             test -d us/${dist}/${part}/source || mkdir -p us/${dist}/${part}/source
40             (cd us/${dist}/${part}/source &&
41                 $wget_cmd -N ${ftpsite}/dists/${dist}/${part}/source/Sources.gz)
42         done
43
44         $check_release_cmd $archivedir/us/${dist}/Release
45     done
46 else
47     echo using local mirror
48     for dist in $dists
49     do
50         echo "retrieve Releases(.gpg) $dist"
51         test -d us/${dist} || mkdir -p us/${dist}
52         rsync -Lt ${localdir}/dists/${dist}/Release us/${dist}/Release
53         rsync -Lt ${localdir}/dists/${dist}/Release.gpg us/${dist}/Release.gpg
54
55         foo=\$arch_${dist//-/_}
56         for arch in `eval echo $foo`
57         do
58             for part in ${parts}
59             do
60                 echo retrieve Packages $dist/$part/$arch
61                 test -d us/${dist}/${part}/binary-${arch} || mkdir -p us/${dist}/${part}/binary-${arch}
62                 rsync -Lt ${localdir}/dists/${dist}/${part}/binary-${arch}/Packages.gz \
63                     us/${dist}/${part}/binary-${arch}/Packages.gz
64             done
65             #FIXME: no Contents files for p-u
66             #FIXME: the symlinks for wheezy/sid/experimental will go away
67             #FIXME: this only pulls in the contents files for main in wheezy/sid/experimental
68             echo retrieve Contents $dist/$arch
69             rsync -Lt ${localdir}/dists/${dist}/Contents-${arch}.gz \
70                 us/${dist}/Contents-${arch}.gz
71         done
72         for part in ${parts}
73         do
74             echo retrieve Sources $dist/$part
75             test -d us/${dist}/${part}/source || mkdir -p us/${dist}/${part}/source
76             rsync -Lt ${localdir}/dists/${dist}/${part}/source/Sources.gz \
77                 us/${dist}/${part}/source/Sources.gz
78         done
79
80         $check_release_cmd $archivedir/us/${dist}/Release
81     done
82 fi
83
84 # security archive
85 #
86 for dist in lenny squeeze
87 do
88     echo "retrieve Release(.gpg) $dist"
89     test -d security/${dist} || mkdir -p security/${dist}
90     (cd security/${dist} &&
91         $wget_cmd -N ${security_ftpsite}/dists/${dist}/updates/Release &&
92         $wget_cmd -N ${security_ftpsite}/dists/${dist}/updates/Release.gpg )
93         
94     foo=\$arch_${dist//-/_}
95     for arch in `eval echo $foo`
96     do
97       for part in ${parts}
98       do
99         echo retrieve Packages $dist/$part/security/$arch
100         test -d security/${dist}/${part}/binary-${arch} || mkdir -p security/${dist}/${part}/binary-${arch}
101         (cd  security/${dist}/${part}/binary-${arch} &&
102             $wget_cmd -N ${security_ftpsite}/dists/${dist}/updates/${part}/binary-${arch}/Packages.gz)
103       done
104     done
105     for part in ${parts}
106     do
107         echo retrieve Sources $dist/$part/security
108         test -d security/${dist}/${part}/source || mkdir -p security/${dist}/${part}/source
109         (cd security/${dist}/${part}/source &&
110             $wget_cmd -N ${security_ftpsite}/dists/${dist}/updates/${part}/source/Sources.gz)
111     done
112
113     $check_release_cmd $archivedir/security/${dist}/Release
114 done