OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 ############################################################################### | 2 ############################################################################### |
3 # Copyright 2015 Google Inc. | 3 # Copyright 2015 Google Inc. |
4 # | 4 # |
5 # Use of this source code is governed by a BSD-style license that can be | 5 # Use of this source code is governed by a BSD-style license that can be |
6 # found in the LICENSE file. | 6 # found in the LICENSE file. |
7 ############################################################################### | 7 ############################################################################### |
8 # | 8 # |
9 # android_setup.sh: Sets environment variables used by other Android scripts. | 9 # android_setup.sh: Sets environment variables used by other Android scripts. |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 shift | 26 shift |
27 elif [[ "$1" == "-t" ]]; then | 27 elif [[ "$1" == "-t" ]]; then |
28 BUILDTYPE=$2 | 28 BUILDTYPE=$2 |
29 shift | 29 shift |
30 elif [[ "$1" == "--release" ]]; then | 30 elif [[ "$1" == "--release" ]]; then |
31 BUILDTYPE=Release | 31 BUILDTYPE=Release |
32 elif [[ "$1" == "--clang" ]]; then | 32 elif [[ "$1" == "--clang" ]]; then |
33 USE_CLANG="true" | 33 USE_CLANG="true" |
34 elif [[ "$1" == "--logcat" ]]; then | 34 elif [[ "$1" == "--logcat" ]]; then |
35 LOGCAT=1 | 35 LOGCAT=1 |
| 36 elif [[ "$1" == "--verbose" ]]; then |
| 37 set -x |
36 else | 38 else |
37 APP_ARGS=("${APP_ARGS[@]}" "${1}") | 39 APP_ARGS=("${APP_ARGS[@]}" "${1}") |
38 fi | 40 fi |
39 shift | 41 shift |
40 done | 42 done |
41 | 43 |
42 function verbose { | 44 function verbose { |
43 if [[ -n $VERBOSE ]]; then | 45 if [[ -n $VERBOSE ]]; then |
44 echo $@ | 46 echo $@ |
45 fi | 47 fi |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 adb_push_if_needed $HOST_SRC $ANDROID_DST | 256 adb_push_if_needed $HOST_SRC $ANDROID_DST |
255 else | 257 else |
256 echo -n "$ANDROID_DST " | 258 echo -n "$ANDROID_DST " |
257 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" | 259 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" |
258 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST | 260 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST |
259 fi | 261 fi |
260 fi | 262 fi |
261 } | 263 } |
262 | 264 |
263 setup_device "${DEVICE_ID}" | 265 setup_device "${DEVICE_ID}" |
OLD | NEW |