try it
touch / tmp / nt; while [true]; do if [ find . -newer /tmp/nt -type f
| grep -v app/cache | wc -l-gt 0]; then phpunit; touch / tmp / nt; Fi sleep 5; done
I use it to autoplay phpunit. Replace phpunit with the command to run the tests, replace sleep 5with sleep 1if you want to check every second (depending on the size of your files)
source
share