From 435b59751323b2ff563a817dae0cad55e2f20eae Mon Sep 17 00:00:00 2001 From: deajan Date: Thu, 8 Dec 2016 22:10:54 +0100 Subject: [PATCH] Workaround for FreeBSD inotifywait only wants one exclude --- dev/n_osync.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/n_osync.sh b/dev/n_osync.sh index 6be064a..3e74595 100755 --- a/dev/n_osync.sh +++ b/dev/n_osync.sh @@ -4,7 +4,7 @@ PROGRAM="osync" # Rsync based two way sync engine with fault tolerance AUTHOR="(C) 2013-2016 by Orsiris de Jong" CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr" PROGRAM_VERSION=1.2-beta3 -PROGRAM_BUILD=2016120804 +PROGRAM_BUILD=2016120805 IS_STABLE=no #TODO: update waitfor parallelexec and checkarguments @@ -2036,11 +2036,11 @@ function SyncOnChanges { Logger "#### Monitoring now." "NOTICE" if [ "$LOCAL_OS" == "MacOSX" ]; then - fswatch --exclude $OSYNC_DIR $RSYNC_PATTERNS $RSYNC_PARTIAL_EXCLUDE -1 "$INITIATOR_SYNC_DIR" > /dev/null & + fswatch --exclude $RSYNC_PATTERNS $RSYNC_PARTIAL_EXCLUDE "$OSYNC_DIR" -1 "$INITIATOR_SYNC_DIR" > /dev/null & # Mac fswatch doesn't have timeout switch, replacing wait $! with WaitForTaskCompletion without warning nor spinner and increased SLEEP_TIME to avoid cpu hogging. This sims wait $! with timeout WaitForTaskCompletion $! 0 $MAX_WAIT 1 0 true false true else - inotifywait --exclude $OSYNC_DIR $RSYNC_PATTERNS $RSYNC_PARTIAL_EXCLUDE -qq -r -e create -e modify -e delete -e move -e attrib --timeout "$MAX_WAIT" "$INITIATOR_SYNC_DIR" & + inotifywait --exclude $RSYNC_PATTERNS $RSYNC_PARTIAL_EXCLUDE "$OSYNC_DIR" -qq -r -e create -e modify -e delete -e move -e attrib --timeout "$MAX_WAIT" "$INITIATOR_SYNC_DIR" & wait $! fi retval=$?