Skip to content

Instantly share code, notes, and snippets.

@drzhbe
Created April 9, 2015 08:53
Show Gist options
  • Save drzhbe/0aac6d0d6374393f6b06 to your computer and use it in GitHub Desktop.
Save drzhbe/0aac6d0d6374393f6b06 to your computer and use it in GitHub Desktop.
on file change push it to the phone and restart the app
#!/bin/bash
# exclude ".qml.*" because QtCreator on change 'Transport.qml' creates additional file like 'Transport.qml.R12384'
cd src/v4qml
inotifywait -mre close_write --exclude '\.qml\.' --format "%w %f" . | while read dir file; do
# cut './' from the path './RegionUI/...' → 'RegionUI/...'
f="${dir:2}$file"
echo "Changed: $f"
# @TODO change 'drz' to $1
adb push "$f" "/sdcard/drz/$f"
adb shell am force-stop ru.dublgis.dgismobile
adb shell am start -n ru.dublgis.dgismobile/ru.dublgis.dgismobile.GrymMobileActivity
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment