From be9dc79cff4b04b2bb6af6dbbe679a0c8a5f6df4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Tue, 28 May 2013 19:03:10 +0200 Subject: Added new file: run.sh It just runs the emulator, installs leap_android and runs it. No debugger session is returned. --- run.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 run.sh (limited to 'run.sh') diff --git a/run.sh b/run.sh new file mode 100755 index 00000000..eace457e --- /dev/null +++ b/run.sh @@ -0,0 +1,28 @@ +#!/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!" +} + +emulator -wipe-data @$avd_name & # If you want to test the app from scratch +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 -- cgit v1.2.3 From a80f3ce0b074b99b6f66bf0c9db28f89d53e5847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Wed, 29 May 2013 16:06:31 +0200 Subject: README now suggest to use scripts. I've entered a new script: compile.sh I've also simlinked README.txt to README. In the future, if we want to write another file in another format (MarkDown?), we will only have to change the target of the README file. --- run.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'run.sh') diff --git a/run.sh b/run.sh index eace457e..b5a08612 100755 --- a/run.sh +++ b/run.sh @@ -22,7 +22,17 @@ wait_until_booted() { echo "Emulator booted!" } -emulator -wipe-data @$avd_name & # If you want to test the app from scratch +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 -- cgit v1.2.3