tainacan-theme/build-watch.sh

16 lines
450 B
Bash
Raw Permalink Normal View History

2018-01-19 17:06:56 +00:00
#!/bin/sh
## Run the build script whenever there is a change in src folder
echo 'Watching changes on src/'
2021-03-22 03:12:18 +00:00
current_OS=`uname`
2018-01-19 17:06:56 +00:00
2021-03-22 03:12:18 +00:00
# For macOS (Darwin), you can install fsevents-tools via Homebrew: `brew install fsevents-tools`
if [ $current_OS == "Darwin" ]; then
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