6 [ -n "$topdir" -a -d "$topdir" ] || exit 1
7 mirror="$topdir/mirror"
11 STAMP=$(date "+%Y%m%d%H%M")
15 if lockfile -! -r2 -300 "$mirror/mirror.lock"
17 echo "couldn't aquire mirror.lock in due time"
22 chmod 777 "$new/cache"
25 ln -f "$topdir/config.sh"
26 ln -f "$topdir/README.Mirror"
30 ln -f "$topdir/bin/mod_perl-startup"
34 ln -f "$topdir/conf/apache.conf"
36 mkdir -p "$new/cgi-bin"
38 ln -f "$topdir/cgi-bin/dispatcher.pl"
40 for d in lib files templates po www
43 rsync -avH --link-dest "$topdir/$d" \
44 --exclude '*.new' --exclude '*.sed.in' \
45 --exclude '*.slices' --exclude '*~' \
46 --exclude '*.lock' --exclude '*.ttc' --exclude 'logs/' \
47 --exclude 'packages/*/' --exclude 'changelogs.*.dump' \
48 --exclude 'changelogs.cache' --exclude 'changelogs/**/log' \
49 --exclude "/auto" --exclude "/Search" --exclude "/perl" \
50 --delete-excluded --delete-after \
51 "$topdir/$d/" "$new/$d/"
54 ln -sfT $new $mirror/current
55 find $mirror -mindepth 1 -maxdepth 1 -not -name "${STAMP}" -type d -print0 \
56 | xargs --no-run-if-empty -0 rm -rf
58 rm -f "$mirror/mirror.lock"