emu: add -r option to restart (and reload sources) when sources are changed

pull/25/head
Pavol Rusnak 8 years ago
parent 93ad93ff94
commit 5be6a82682
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

@ -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 &

Loading…
Cancel
Save