#!/bin/sh RSYNCSOURCE=rsync://us.archive.ubuntu.com/ubuntu #RSYNCSOURCE=rsync://ubuntu.media.mit.edu/ubuntu BASEDIR=${MIRRORDIR}/ubuntu set -x set -v set -e set -u # 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 PASS1=(--exclude Packages\* --exclude Sources\* --exclude Release\* --exclude InRelease --exclude i18n/\* --exclude ls-lR\* --exclude Translation\*) rsync --recursive --times --links --hard-links \ --stats \ --verbose --timeout=600 \ "${PASS1[@]}" \ ${RSYNCSOURCE} ${BASEDIR} rsync --recursive --times --links --hard-links \ --stats --delete --delete-after \ --verbose --timeout=600 \ --exclude "project/trace/${HOSTNAME}" \ ${RSYNCSOURCE} ${BASEDIR} date -u > "${BASEDIR}/project/trace/mirrors.mit.edu"