diff --git a/emu.sh b/emu.sh index 026ab77f1..4742bb36f 100755 --- a/emu.sh +++ b/emu.sh @@ -16,6 +16,16 @@ case "$1" in shift gdb --args ../vendor/micropython/unix/micropython $ARGS $* $MAIN ;; + "-r") + shift + while true; do + ../vendor/micropython/unix/micropython $ARGS $* $MAIN & + UPY_PID=$! + find -name '*.py' | inotifywait -q -e close_write --fromfile - + echo Restarting ... + kill $UPY_PID + done + ;; "-p") shift ../vendor/micropython/unix/micropython $ARGS $* $MAIN &