aboutsummaryrefslogtreecommitdiff
path: root/watch
diff options
context:
space:
mode:
Diffstat (limited to 'watch')
-rwxr-xr-xwatch22
1 files changed, 8 insertions, 14 deletions
diff --git a/watch b/watch
index 5a5076c..a9a0dba 100755
--- a/watch
+++ b/watch
@@ -1,16 +1,10 @@
#!/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/ content/
- kill $PID
-done
+case $1 in
+ actix)
+ cargo watch -x "run --bin actix"
+ ;;
+ *)
+ cargo watch -x "run --bin hyper"
+ ;;
+esac