summaryrefslogtreecommitdiffstats
path: root/bin/sync-openbsd-ftp-tree.sh
diff options
context:
space:
mode:
authorsyncer <root@plopp.spline.de>2012-01-11 18:17:09 +0100
committersyncer <root@plopp.spline.de>2012-01-11 18:18:29 +0100
commit657d1fc484fa0b21b979525a92ace5c9e6f63da2 (patch)
treef395b3a6f1993f4b5c4b46b8bebf04f730987739 /bin/sync-openbsd-ftp-tree.sh
downloadmirror-sync-657d1fc484fa0b21b979525a92ace5c9e6f63da2.tar.gz
mirror-sync-657d1fc484fa0b21b979525a92ace5c9e6f63da2.tar.bz2
mirror-sync-657d1fc484fa0b21b979525a92ace5c9e6f63da2.zip
inital import
Diffstat (limited to 'bin/sync-openbsd-ftp-tree.sh')
-rwxr-xr-xbin/sync-openbsd-ftp-tree.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/bin/sync-openbsd-ftp-tree.sh b/bin/sync-openbsd-ftp-tree.sh
new file mode 100755
index 0000000..ed0ddcc
--- /dev/null
+++ b/bin/sync-openbsd-ftp-tree.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# See http://www.openbsd.org/ftp.html for up-to-date mirror list!
+REMOTE=rsync://ftp.eu.openbsd.org/OpenBSD/
+PUBDIR=/raid/ftp/pub/OpenBSD
+LOCKFILE=/tmp/`basename ${0}`.lock
+
+if [ "$1" = "-v" ]; then
+ verbose="-v"
+else
+ verbose="-q"
+fi
+
+lockfile -r 3 ${LOCKFILE} || exit 1
+rsync $verbose -a -i --recursive --times --links --hard-links --delete \
+ --exclude="/[2-3].[0-9]" \
+ --exclude="/4.[0-8]" \
+ --exclude="/cvs" \
+ --exclude="/distfiles" \
+ --exclude="/tmp" \
+ --exclude="/README" \
+ --exclude="/README~" \
+ ${REMOTE} ${PUBDIR}
+rm -f ${LOCKFILE}