]> asedeno.scripts.mit.edu Git - sipb-mirrors.git/blob - fetch-scripts/ubuntu-archive
Switch to closer Ubuntu mirror
[sipb-mirrors.git] / fetch-scripts / ubuntu-archive
1 #!/bin/sh
2
3 RSYNCSOURCE=rsync://us.archive.ubuntu.com/ubuntu
4 #RSYNCSOURCE=rsync://ubuntu.media.mit.edu/ubuntu
5 BASEDIR=${MIRRORDIR}/ubuntu
6
7 set -x
8 set -v
9 set -e
10 set -u
11
12 # Options we only use in the first pass, where we do not want packages/sources to fly in yet and dont want to delete files
13 PASS1=(--exclude Packages\* --exclude Sources\* --exclude Release\* --exclude InRelease --exclude i18n/\* --exclude ls-lR\* --exclude Translation\*)
14
15 rsync --recursive --times --links --hard-links \
16       --stats \
17       --verbose --timeout=600 \
18       "${PASS1[@]}" \
19       ${RSYNCSOURCE} ${BASEDIR}
20
21 rsync --recursive --times --links --hard-links \
22       --stats --delete --delete-after \
23       --verbose --timeout=600 \
24       --exclude "project/trace/${HOSTNAME}" \
25       ${RSYNCSOURCE} ${BASEDIR}