diff options
Diffstat (limited to 'bin/sync-openbsd-cvs-repo.sh')
-rwxr-xr-x | bin/sync-openbsd-cvs-repo.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/bin/sync-openbsd-cvs-repo.sh b/bin/sync-openbsd-cvs-repo.sh new file mode 100755 index 0000000..cc546ff --- /dev/null +++ b/bin/sync-openbsd-cvs-repo.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# update openbsd anoncvscvs mirror (scripted by stsp) + +#set -e + +#logger "`basename $0`: invoked `date`" + +CVS_ROOTDIR=/raid/anoncvs/OpenBSD/cvs +LOCKFILE=/tmp/`basename ${0}`.lock + +lockfile -r 3 ${LOCKFILE} || exit 1 +(cd $CVS_ROOTDIR && \ + rsync -q -a --recursive --times --links --hard-links --delete \ + --exclude=CVSROOT/history \ + --exclude=CVSROOT/writers \ + --exclude=CVSROOT/readers \ + --exclude=CVSROOT/passwd \ + rsync://rsync.de.openbsd.org/OpenBSD-CVS . ) + +# we are using our own readers, writers and passwd files. +cp /dev/null $CVS_ROOTDIR/CVSROOT/writers +echo "anoncvs" > $CVS_ROOTDIR/CVSROOT/readers +echo "anoncvs:AHDysQkJIubEc" > $CVS_ROOTDIR/CVSROOT/passwd +echo "" > $CVS_ROOTDIR/CVSROOT/config + +# One line in the modules file breaks checkouts, +# due to debian bug #226888. Comment it out. --stsp +sed -i -e 's/\(^www.*-i.*\)/#\1/' $CVS_ROOTDIR/CVSROOT/modules + +rm -f ${LOCKFILE} |