1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash
cd "$(dirname "$0")"
make
make start
trap "make stop;" EXIT
inotifywait -qrm -e modify -e create -e move -e delete --format '%w%f' $PWD | grep --line-buffered -v 'public\|.swp$\|~$' | (
while true
do
timeout 1 cat /dev/stdin | sort -u
done | \
while read l
do
echo files changed: $l
make
done
)