Build watch for macOS

This commit is contained in:
weryques 2018-03-20 14:14:27 -03:00
parent 868c917c90
commit c60902a035
1 changed files with 12 additions and 4 deletions

View File

@ -4,8 +4,16 @@
echo 'Watching changes on src/' echo 'Watching changes on src/'
current_OS=`uname`
# For macOS (Darwin) is needed fsevents-tools installed (you can use homebrew install fsevents-tools)
if [ $current_OS == "Darwin" ]; then
echo
notifyloop src ./build.sh
else
while inotifywait -qqr src -e create,move,modify,delete; do while inotifywait -qqr src -e create,move,modify,delete; do
echo echo
echo 'Change detected, running build' echo 'Change detected, running build'
./build.sh ./build.sh
done done
fi