From c60902a035cc5830e5a5aa5c93198a3df94eec2c Mon Sep 17 00:00:00 2001 From: weryques Date: Tue, 20 Mar 2018 14:14:27 -0300 Subject: [PATCH] Build watch for macOS --- build-watch.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/build-watch.sh b/build-watch.sh index 4977df4db..698d272ee 100755 --- a/build-watch.sh +++ b/build-watch.sh @@ -4,8 +4,16 @@ echo 'Watching changes on src/' -while inotifywait -qqr src -e create,move,modify,delete; do +current_OS=`uname` + +# For macOS (Darwin) is needed fsevents-tools installed (you can use homebrew install fsevents-tools) +if [ $current_OS == "Darwin" ]; then echo - echo 'Change detected, running build' - ./build.sh -done \ No newline at end of file + notifyloop src ./build.sh +else + while inotifywait -qqr src -e create,move,modify,delete; do + echo + echo 'Change detected, running build' + ./build.sh + done +fi \ No newline at end of file