blob: 2d758b1f0a8881bafb7b5aa7f430d7554d6f742f (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
#!/bin/sh
# Execute given command when current dir content changes.
trap exit SIGINT
while true; do
"$@"
x=$? c=$((c+1))
echo "# $c $(date +%H:%M:%S): $@: exit $x"
fswatch -1 . >/dev/null 2>&1
done
|