diff --git a/dev/n_osync.sh b/dev/n_osync.sh index e45340a..7e4dcac 100755 --- a/dev/n_osync.sh +++ b/dev/n_osync.sh @@ -8,7 +8,7 @@ PROGRAM="osync" # Rsync based two way sync engine with fault tolerance AUTHOR="(C) 2013-2018 by Orsiris de Jong" CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr" PROGRAM_VERSION=1.3.0-dev -PROGRAM_BUILD=2018070204 +PROGRAM_BUILD=2018070801 IS_STABLE=no ##### Execution order #__WITH_PARANOIA_DEBUG @@ -2562,6 +2562,9 @@ function SyncOnChanges { fswatch $RSYNC_PATTERNS $RSYNC_PARTIAL_EXCLUDE --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 ExecTasks $! "MonitorMacOSXWait" false 0 0 0 $MAX_WAIT true 1 0 + elif [ "$LOCAL_OS" "BSD" ]; then + # BSD version of inotifywait does not support multiple --exclude statements + inotifywait --exclude "$OSYNC_DIR" -qq -r -e create -e modify -e delete -e move -e attrib --timeout "$MAX_WAIT" "$INITIATOR_SYNC_DIR" & else inotifywait $RSYNC_PATTERNS $RSYNC_PARTIAL_EXCLUDE --exclude "$OSYNC_DIR" -qq -r -e create -e modify -e delete -e move -e attrib --timeout "$MAX_WAIT" "$INITIATOR_SYNC_DIR" & wait $!