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 16 matching lines...) Expand all Loading... |
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 | 36 elif [[ "$1" == "--verbose" ]]; then |
37 set -x | 37 VERBOSE="true" |
| 38 APP_ARGS=("${APP_ARGS[@]}" "${1}") |
38 else | 39 else |
39 APP_ARGS=("${APP_ARGS[@]}" "${1}") | 40 APP_ARGS=("${APP_ARGS[@]}" "${1}") |
40 fi | 41 fi |
41 shift | 42 shift |
42 done | 43 done |
43 | 44 |
44 function verbose { | 45 function verbose { |
45 if [[ -n $VERBOSE ]]; then | 46 if [[ -n $VERBOSE ]]; then |
46 echo $@ | 47 echo $@ |
47 fi | 48 fi |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 adb_push_if_needed $HOST_SRC $ANDROID_DST | 257 adb_push_if_needed $HOST_SRC $ANDROID_DST |
257 else | 258 else |
258 echo -n "$ANDROID_DST " | 259 echo -n "$ANDROID_DST " |
259 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" | 260 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" |
260 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST | 261 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST |
261 fi | 262 fi |
262 fi | 263 fi |
263 } | 264 } |
264 | 265 |
265 setup_device "${DEVICE_ID}" | 266 setup_device "${DEVICE_ID}" |
OLD | NEW |