diff --git a/tngame-rs/.gitignore b/tngame-rs/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/tngame-rs/.gitignore @@ -0,0 +1 @@ +/target diff --git a/tngame-rs/run_watch.sh b/tngame-rs/run_watch.sh new file mode 100755 index 0000000..5069c98 --- /dev/null +++ b/tngame-rs/run_watch.sh @@ -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 +