aboutsummaryrefslogtreecommitdiff
path: root/watch
diff options
context:
space:
mode:
Diffstat (limited to 'watch')
-rwxr-xr-xwatch16
1 files changed, 16 insertions, 0 deletions
diff --git a/watch b/watch
new file mode 100755
index 0000000..9f5acdb
--- /dev/null
+++ b/watch
@@ -0,0 +1,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