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