added optional path to debug

This commit is contained in:
brianleroux 2011-08-20 13:57:19 -07:00
parent 8b908fbad0
commit fe265ce9e1
2 changed files with 15 additions and 3 deletions

View File

@ -16,7 +16,7 @@ PhoneGap/Android Developer Tools
Commands Commands
./bin/create [path package activity] ... create the ./exmaple app or a phonegap/android project ./bin/create [path package activity] ... create the ./exmaple app or a phonegap/android project
./bin/debug ............................ install to first device ./bin/debug [path] ..................... install to first device
./bin/emulate .......................... start avd (emulator) named default ./bin/emulate .......................... start avd (emulator) named default
./bin/log .............................. starts logcat ./bin/log .............................. starts logcat
./bin/test ............................. run mobile-spec ./bin/test ............................. run mobile-spec
@ -32,8 +32,7 @@ Start avd (emulator) named `default`:
Create the exmaple project and build it to the first device: Create the exmaple project and build it to the first device:
./bin/create ./bin/create
cd example ./bin/debug ./example
./../bin/debug
Start adb logcat (console.log calls output here): Start adb logcat (console.log calls output here):

View File

@ -1,4 +1,17 @@
#! /bin/sh #! /bin/sh
#
# USAGE
# ./debug [path]
#
set -e
PROJECT_PATH=${1:-$PWD}
# go to the proj
cd $PROJECT_PATH
# compile and install to the first device
ant debug install ant debug install
# start the app
adb shell am start -n $(cat ./package-activity) adb shell am start -n $(cat ./package-activity)