3 . `dirname $0`/../config.sh
5 test -d ${archivedir} || mkdir -p ${archivedir}
11 if [ -z "${localdir}" ]
13 echo using remote mirror
16 echo "retrieve Release(.gpg) $dist"
17 test -d us/${dist}-${arch} || mkdir -p us/${dist}-${arch}
19 wget -q -N ${ftpsite}/dists/${dist}-${arch}/Release &&
20 wget -q -N ${ftpsite}/dists/${dist}-${arch}/Release.gpg )
22 # foo=\$arch_${dist//-/_}
23 # for arch in `eval echo $foo`
27 echo retrieve Packages $dist-${arch}/$part/$arch
28 test -d us/${dist}-${arch}/${part}/binary-${arch} || mkdir -p us/${dist}-${arch}/${part}/binary-${arch}
29 (cd us/${dist}-${arch}/${part}/binary-${arch} &&
30 wget -q -N ${ftpsite}/dists/${dist}-${arch}/${part}/binary-${arch}/Packages.gz)
32 #FIXME: no Contents files for p-u
33 test ! "$dist" = "experimental" || continue
34 echo retrieve Contents $dist/$arch
35 (cd us/${dist}-${arch} &&
36 wget -q -N ${ftpsite}/dists/${dist}-${arch}/Contents-${arch}.gz)
40 echo retrieve Sources $dist-${arch}/$part
41 test -d us/${dist}-${arch}/${part}/source || mkdir -p us/${dist}-${arch}/${part}/source
42 (cd us/${dist}-${arch}/${part}/source &&
43 wget -q -N ${ftpsite}/dists/${dist}-${arch}/${part}/source/Sources.gz)
47 echo using local mirror
50 echo "retrieve Releases(.gpg) $dist"
51 test -d us/${dist}-${arch} || mkdir -p us/${dist}-${arch}
52 (cd us/${dist}-${arch} &&
53 rsync -t ${localdir}/dists/${dist}-${arch}/Release &&
54 rsync -t ${localdir}/dists/${dist}-${arch}/Release.gpg )
56 # foo=\$arch_${dist//-/_}
57 # for arch in `eval echo $foo`
61 echo retrieve Packages $dist-${arch}/$part/$arch
62 test -d us/${dist}-${arch}/${part}/binary-${arch} || mkdir -p us/${dist}-${arch}/${part}/binary-${arch}
63 rsync -t ${localdir}/dists/${dist}-${arch}/${part}/binary-${arch}/Packages.gz \
64 us/${dist}-${arch}/${part}/binary-${arch}/Packages.gz
66 #FIXME: no Contents files for p-u
67 test ! "$dist" = "experimental" || continue
68 echo retrieve Contents $dist-${arch}/$arch
69 rsync -t ${localdir}/dists/${dist}-${arch}/Contents-${arch}.gz \
70 us/${dist}-${arch}/Contents-${arch}.gz
74 echo retrieve Sources $dist-${arch}/$part
75 test -d us/${dist}-${arch}/${part}/source || mkdir -p us/${dist}-${arch}/${part}/source
76 rsync -t ${localdir}/dists/${dist}-${arch}/${part}/source/Sources.gz \
77 us/${dist}-${arch}/${part}/source/Sources.gz