1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/bin/sh npm run phpstan echo All done, RC=$?. while true; do inotifywait . -e close_write -r -t 300 | grep -q .php && \ ( MODIFIED=$(git ls-files -m | grep .php) npm run phpstan echo All done, RC=$?. ) sleep 1 done