aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCache Saravento <cache@sarava.org>2015-08-08 11:29:46 -0300
committerCache Saravento <cache@sarava.org>2015-08-08 11:29:46 -0300
commit6eb2c7fe4af1fae8aea7d5d6c925372687540e09 (patch)
tree88a81048b04be4514e8057626076acc878608b33
parent95a73b1c98e5f6aa87a2650e7c8f35a47f145483 (diff)
downloadcache-6eb2c7fe4af1fae8aea7d5d6c925372687540e09.tar.gz
cache-6eb2c7fe4af1fae8aea7d5d6c925372687540e09.tar.bz2
Sync lockfile
-rw-r--r--.gitignore1
-rwxr-xr-xbin/sync14
m---------httruta0
3 files changed, 14 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index 5d19bf6..db13190 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
/recentchanges
/www
data
+.sync-lockfile
diff --git a/bin/sync b/bin/sync
index aaae025..5962eef 100755
--- a/bin/sync
+++ b/bin/sync
@@ -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