[+] Script to restart when files change
This commit is contained in:
@@ -0,0 +1 @@
|
||||
/target
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
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 `pwd` --include '.*\.rs'
|
||||
kill $PID
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user