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 |
11 # Fail-fast if anything in the script fails. | 11 # Fail-fast if anything in the script fails. |
12 set -e | 12 set -e |
13 | 13 |
14 BUILDTYPE=${BUILDTYPE-Debug} | 14 BUILDTYPE=${BUILDTYPE-Debug} |
15 USE_CLANG="false" | 15 USE_CLANG="true" |
16 | 16 |
17 while (( "$#" )); do | 17 while (( "$#" )); do |
18 if [[ "$1" == "-d" ]]; then | 18 if [[ "$1" == "-d" ]]; then |
19 DEVICE_ID=$2 | 19 DEVICE_ID=$2 |
20 shift | 20 shift |
21 elif [[ "$1" == "-i" || "$1" == "--resourcePath" ]]; then | 21 elif [[ "$1" == "-i" || "$1" == "--resourcePath" ]]; then |
22 RESOURCE_PATH=$2 | 22 RESOURCE_PATH=$2 |
23 APP_ARGS=("${APP_ARGS[@]}" "${1}" "${2}") | 23 APP_ARGS=("${APP_ARGS[@]}" "${1}" "${2}") |
24 shift | 24 shift |
25 elif [[ "$1" == "-s" ]]; then | 25 elif [[ "$1" == "-s" ]]; then |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" | 273 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" |
274 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST | 274 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST |
275 fi | 275 fi |
276 fi | 276 fi |
277 | 277 |
278 # turn error checking back on | 278 # turn error checking back on |
279 set -e | 279 set -e |
280 } | 280 } |
281 | 281 |
282 setup_device "${DEVICE_ID}" | 282 setup_device "${DEVICE_ID}" |
OLD | NEW |