aboutsummaryrefslogtreecommitdiff
path: root/watch
blob: 9f5acdb892dd59d940fab9a5b32a6539b2f79c2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

sigint_handler()
{
  kill $PID
  exit
}

trap sigint_handler SIGINT

while true; do
  cargo run &
  PID=$!
  inotifywait -e modify -e move -e create -e delete -e attrib -r  src/ templates/ assets/
  kill $PID
done