Skip to content
Browse files

Add an auto-rsync script.

  • Loading branch information...
1 parent 7156d77 commit 4e4a3a9dc7e9de3b6baaf4fd750df748e6c0e5bb @ggreer committed Apr 24, 2012
Showing with 14 additions and 1 deletion.
  1. +1 −1 Makefile.am
  2. +13 −0 auto_rsync
View
2 Makefile.am
@@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
bin_PROGRAMS = notifywait
notifywait_SOURCES = notifywait.c
-dist_bin_SCRIPTS = notify_loop
+dist_bin_SCRIPTS = auto_rsync notify_loop
man_MANS = doc/notifywait.1
View
13 auto_rsync
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ $# -lt 2 ]
+then
+ echo "Usage: $0 path destination"
+ exit 1
+fi
+
+WATCH_PATH=$1
+shift
+DEST=$@
+
+notify_loop $WATCH_PATH rsync -avz $WATCH_PATH $DEST

0 comments on commit 4e4a3a9

Please sign in to comment.
Something went wrong with that request. Please try again.