#!/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 )