~ecs/wersh

wersh/wersh-watch -rwxr-xr-x 332 bytes
b5d8cd01Eyal Sawady Miscellaneous fixes 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
if ! which inotifywait > /dev/null 2>&1
then
	echo "inotifywait is not installed." >&2
	echo "Note: this script is Linux-specific." >&2
	exit 1
fi

wersh "$@"
echo "Waiting for changes..."
while inotifywait -r \
	--exclude "_site/.*" \
	-e modify,move,create,delete \
	.
do
	echo "Waiting for changes..."
	wersh "$@"
done