#!/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