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

RSYNC="/usr/bin/rsync"
OPTS="--quiet --recursive --links --perms --times --devices --delete --timeout=600 --password-file=/home/syncer/etc/gentoo_distfiles"
SRC="gentoo@masterdistfiles.gentoo.org::gentoo"
DST="/raid/ftp/pub/gentoo/"

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

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