~sircmpwn/wersh

wersh/wersh-watch -rwxr-xr-x 356 bytes
0d248590Drew DeVault Add wersh-watch 2 years 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