diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rwxr-xr-x | bin/sync | 14 | ||||
m--------- | httruta | 0 |
3 files changed, 14 insertions, 1 deletions
@@ -2,3 +2,4 @@ /recentchanges /www data +.sync-lockfile @@ -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 diff --git a/httruta b/httruta -Subproject 2a86a569c497590fe83e3f6a04e992010eac782 +Subproject f7ee96f1120761c6708dbb0e7c5c470039b85a0 |