OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # | 2 # |
3 # android_run_skia: starts the correct skia program on the device, prints the | 3 # android_run_skia: starts the correct skia program on the device, prints the |
4 # output, and kills the app if interrupted. | 4 # output, and kills the app if interrupted. |
5 | 5 |
6 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | 6 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" |
7 | 7 |
8 source $SCRIPT_DIR/utils/setup_adb.sh | 8 source $SCRIPT_DIR/utils/setup_adb.sh |
9 | 9 |
10 APP_ARGS="" | 10 APP_ARGS="" |
(...skipping 17 matching lines...) Expand all Loading... |
28 else | 28 else |
29 APP_ARGS="$APP_ARGS $1" | 29 APP_ARGS="$APP_ARGS $1" |
30 fi | 30 fi |
31 | 31 |
32 shift | 32 shift |
33 done | 33 done |
34 | 34 |
35 | 35 |
36 if [[ "$USE_INTENT" == "true" ]]; | 36 if [[ "$USE_INTENT" == "true" ]]; |
37 then | 37 then |
38 $ADB logcat -c | 38 $ADB $SERIAL logcat -c |
39 $ADB $SERIAL shell am broadcast -a com.skia.intent.action.LAUNCH_SKIA -n com
.skia/.SkiaReceiver -e args "$APP_ARGS" | 39 $ADB $SERIAL shell am broadcast -a com.skia.intent.action.LAUNCH_SKIA -n com
.skia/.SkiaReceiver -e args "$APP_ARGS" |
40 trap "echo \"Interrupt.\"" INT | 40 trap "echo \"Interrupt.\"" INT |
41 eval "($ADB logcat)" | 41 eval "($ADB $SERIAL logcat)" |
42 trap - INT | 42 trap - INT |
43 echo "Interrupt. Killing Skia process..." | 43 echo "Interrupt. Killing Skia process..." |
44 $SCRIPT_DIR/android_kill_skia | 44 $SCRIPT_DIR/android_kill_skia $SERIAL |
45 echo "Done." | 45 echo "Done." |
46 else | 46 else |
47 $ADB $SERIAL shell skia_launcher $APP_ARGS | 47 $ADB $SERIAL shell skia_launcher $APP_ARGS |
48 fi | 48 fi |
OLD | NEW |