aboutsummaryrefslogtreecommitdiff
path: root/watch
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2022-05-05 23:15:41 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2022-05-05 23:15:41 +0200
commite7c5dc01cf3bf382c82dd6984808bd3ca21d33a5 (patch)
treeb1f1d6fd9e8bc4814f8c8f541456519660bbe2b1 /watch
downloadmacroblog.rs-e7c5dc01cf3bf382c82dd6984808bd3ca21d33a5.tar.gz
macroblog.rs-e7c5dc01cf3bf382c82dd6984808bd3ca21d33a5.tar.bz2
macroblog.rs-e7c5dc01cf3bf382c82dd6984808bd3ca21d33a5.zip
Initial commit
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