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

RSYNC="/usr/bin/rsync"
OPTS="--quiet --recursive --links --perms --times --devices --compress --delete --timeout=600"
SRC="rsync://masterportage.gentoo.org/gentoo-portage"
DST="/raid/gentoo-portage/"

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

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