Skip to content

Instantly share code, notes, and snippets.

@mrosset
Created June 29, 2012 22:42
Show Gist options
  • Save mrosset/3021187 to your computer and use it in GitHub Desktop.
Save mrosset/3021187 to your computer and use it in GitHub Desktop.
watch android project, rebuild,install and run on MODIFY
#!/bin/bash
_testit() {
printf "running "
touch .lock
ant debug install 1> /dev/null
adb shell 'am start -n com.example.thumbs/.ThumbsActivity' 1> /dev/null
rm .lock
echo "Done."
}
_testit
while inotifywait -e modify .; do
if [[ ! -f .lock ]]; then
_testit
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment