diff --git a/README.org b/README.org index e10d354..b4968c0 100644 --- a/README.org +++ b/README.org @@ -94,6 +94,14 @@ repository. #+begin_src sh make test #+end_src + +To make testing the application while programming a bit easier there's a script +which reloads the application everytime a file changes in the ~borg_qt~ +directory. You to use it run the following command from the root of the +repository. + +#+begin_src sh +./scripts/debugging.sh #+end_src ** Used packages diff --git a/scripts/debugging.sh b/scripts/debugging.sh new file mode 100755 index 0000000..3ed39f9 --- /dev/null +++ b/scripts/debugging.sh @@ -0,0 +1,20 @@ +#!/bin/bash +source venv/bin/activate + +sigint_handler() +{ + kill $PID + exit +} + +trap sigint_handler SIGINT + +cd borg_qt +while true; do + ./borg_qt.py & + PID=$! + echo "---- Press Crtl+C to stop debugging. ----" + inotifywait -e modify -e move -e create -e delete -e attrib --exclude '.*(/\.|_flymake\.py)' -r `pwd` + sleep 0.5 + kill $PID +done