From fe265ce9e13b10f463d589df5370b273ac0c71f7 Mon Sep 17 00:00:00 2001 From: brianleroux Date: Sat, 20 Aug 2011 13:57:19 -0700 Subject: [PATCH] added optional path to debug --- README.md | 5 ++--- bin/debug | 13 +++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 229a5aa6..9e0e6972 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ PhoneGap/Android Developer Tools Commands ./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/log .............................. starts logcat ./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: ./bin/create - cd example - ./../bin/debug + ./bin/debug ./example Start adb logcat (console.log calls output here): diff --git a/bin/debug b/bin/debug index 962816f1..ed4d32c3 100755 --- a/bin/debug +++ b/bin/debug @@ -1,4 +1,17 @@ #! /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 + +# start the app adb shell am start -n $(cat ./package-activity)