about summary refs log tree commit diff stats
path: root/utils/phpstan-watcher.sh
blob: 2494ce9f75dcc05e21ae4ae4468aef477960c519 (plain) (blame)
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