| 1 |
#! /bin/sh
|
| 2 |
|
| 3 |
# $Id$
|
| 4 |
# Thomas Lange, lange@informatik.uni-koeln.de, (c) 2001-2003
|
| 5 |
|
| 6 |
# create partitial debian mirror using debmirror new in unstable/sarge
|
| 7 |
# needs debmirror 20020427-1 or newer
|
| 8 |
|
| 9 |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
| 10 |
rsync_disks() {
|
| 11 |
|
| 12 |
# get the boot disks
|
| 13 |
rsync --delete -av $rsynchost::debian/dists/$1/main/disks-$arch $destdir/debian/dists/$1/main/
|
| 14 |
}
|
| 15 |
|
| 16 |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
| 17 |
update_from() {
|
| 18 |
|
| 19 |
# update local mirror from host $1
|
| 20 |
host=$1
|
| 21 |
allopt="$debug --passive --getcontents --nosource --arch=$arch --ignore=disks-$arch/"
|
| 22 |
defopt="$allopt --host=$host --dist=$dist,$dist-proposed-updates"
|
| 23 |
|
| 24 |
echo "------------------ create mirror for debian ------------------"
|
| 25 |
debmirror $destdir/debian $defopt
|
| 26 |
|
| 27 |
echo "------------------ create mirror for debian-non-US ------------------"
|
| 28 |
debmirror $destdir/debian-non-US $defopt -r /debian-non-US -s non-US/main,non-US/contrib,non-US/non-free
|
| 29 |
}
|
| 30 |
# - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
| 31 |
# main program
|
| 32 |
|
| 33 |
arch=i386
|
| 34 |
dist=woody
|
| 35 |
debug="$@"
|
| 36 |
destdir=/files/scratch
|
| 37 |
|
| 38 |
# first sync to a mirror near to you
|
| 39 |
update_from ftp.uni-koeln.de
|
| 40 |
|
| 41 |
# since this mirror is not always up to date, sync now to an official mirror
|
| 42 |
update_from ftp.de.debian.org
|
| 43 |
|
| 44 |
# even one should not mirror the security site, but I will do it.
|
| 45 |
echo "------------------ create mirror for debian-security ------------------"
|
| 46 |
debmirror $destdir/debian-security $allopt --host=security.debian.org -r debian-security -d $dist/updates
|
| 47 |
|
| 48 |
rsynchost=ftp2.de.debian.org
|
| 49 |
rsync_disks $dist
|