diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/sync | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -7,7 +7,19 @@ DIRNAME="`dirname $0`" WORK="$DIRNAME/.." CWD="`pwd`" +LOCKFILE="$WORK/.sync-lockfile" + +# Set lockfile +if [ -e "$LOCKFILE" ]; then + echo "Locked!" + exit 1 +else + touch $LOCKFILE || exit 1 +fi # Sync cd $DIRNAME -rsync -av rsync://cache.sarava.org/cache/data/ data/ +rsync -avz rsync://cache.sarava.org/cache/data/ data/ + +# Teardown +rm $LOCKFILE |