summaryrefslogtreecommitdiff
path: root/run.sh
diff options
context:
space:
mode:
authorSean Leonard <meanderingcode@aetherislands.net>2013-07-26 15:30:24 -0600
committerSean Leonard <meanderingcode@aetherislands.net>2013-07-26 15:30:24 -0600
commitf49967fb3f24bf0a22d09b5823bd174a45e758f7 (patch)
tree7fefe9ec3aeff998c5dd99861428717a2c5f3a41 /run.sh
parent8dbb4517b07c42c3b37b0764d63973b5b1ed5ee6 (diff)
parentb69c9a87f60e649221c8f83d58bbd57b35a64aca (diff)
Merge branch 'release-0.2.0'0.2.0
Diffstat (limited to 'run.sh')
-rwxr-xr-xrun.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/run.sh b/run.sh
new file mode 100755
index 00000000..b5a08612
--- /dev/null
+++ b/run.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+if [ -z "$2" ]
+then
+ echo Usage: run.sh \"avd name\" \"project folder\"
+ exit 0;
+fi
+avd_name=$1
+PROJECT_FOLDER=$2
+localport=`expr $RANDOM % 65536`
+
+wait_until_booted() {
+ OUT=`adb shell getprop init.svc.bootanim`
+ RES="stopped"
+
+ while [[ ${OUT:0:7} != 'stopped' ]]; do
+ OUT=`adb shell getprop init.svc.bootanim`
+# echo 'Waiting for emulator to fully boot...'
+ sleep 5
+ done
+
+ echo "Emulator booted!"
+}
+
+echo "Press \"y\" key and enter if you want to wipe emulator's data"
+read wipe_data_or_not
+if [ $wipe_data_or_not == "y" ]
+then
+ echo "Wiping data"
+ emulator -wipe-data @$avd_name & # If you want to test the app from scratch
+else
+ echo "Not wiping data"
+ emulator @$avd_name & # If you want to test the app from scratch
+fi
+
+wait_until_booted
+adb install -r $PROJECT_FOLDER/bin/LEAP\ Android-debug.apk # Install the new version of the application
+adb shell am start se.leap.leapclient/.Dashboard # Run app