summaryrefslogtreecommitdiffstats
path: root/bin/sync-archlinux.sh
blob: fd03d231ff8ba1d47ece6efc0bc1d86feece0856 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

RSYNC="/usr/bin/rsync"
OPTS="-rtlvH --delete-after --delay-updates --safe-links --max-delete=1000" # from wiki.archlinux.org
SRC="rsync://ftp5.gwdg.de/pub/linux/archlinux/"
DST="/mirror/ftp/pub/archlinux/"

lockfile=/tmp/`basename $0`.lock

if lockfile -r 5 $lockfile
then
	${RSYNC} ${OPTS} ${SRC} ${DST}
	echo "End: "`date`
	rm -f $lockfile
fi