tainacan/build-watch.sh

19 lines
468 B
Bash
Raw Normal View History

#!/bin/bash
2017-11-06 14:02:51 +00:00
## Run the build script whenever there is a change in src folder
echo 'Watching changes on src/'
2018-03-20 17:14:27 +00:00
current_OS=`uname`
# For macOS (Darwin) is needed fsevents-tools installed (you can use homebrew install fsevents-tools)
if [ $current_OS == "Darwin" ]; then
2017-11-06 14:02:51 +00:00
echo
2018-03-20 17:14:27 +00:00
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