| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # | 2 # |
| 3 # android_setup.sh: Sets environment variables used by other Android scripts. | 3 # android_setup.sh: Sets environment variables used by other Android scripts. |
| 4 | 4 |
| 5 # Parse the arguments for a DEVICE_ID. | 5 # Parse the arguments for a DEVICE_ID. |
| 6 DEVICE_ID="" | 6 DEVICE_ID="" |
| 7 DEVICE_SERIAL="" | 7 DEVICE_SERIAL="" |
| 8 while (( "$#" )); do | 8 while (( "$#" )); do |
| 9 if [[ $(echo "$1" | grep "^-d$") != "" ]]; | 9 if [[ $(echo "$1" | grep "^-d$") != "" ]]; |
| 10 then | 10 then |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 verbose "The build is targeting the device: $TARGET_DEVICE" | 236 verbose "The build is targeting the device: $TARGET_DEVICE" |
| 237 export DEVICE_ID="$TARGET_DEVICE" | 237 export DEVICE_ID="$TARGET_DEVICE" |
| 238 | 238 |
| 239 # Set up the toolchain. | 239 # Set up the toolchain. |
| 240 setup_toolchain | 240 setup_toolchain |
| 241 if [[ "$?" != "0" ]]; then | 241 if [[ "$?" != "0" ]]; then |
| 242 return 1 | 242 return 1 |
| 243 fi | 243 fi |
| 244 DEFINES="${DEFINES} android_toolchain=${TOOLCHAIN_TYPE}" | 244 DEFINES="${DEFINES} android_toolchain=${TOOLCHAIN_TYPE}" |
| 245 | 245 |
| 246 exportVar GYP_DEFINES "$DEFINES" | 246 exportVar GYP_DEFINES "$DEFINES $GYP_DEFINES" |
| 247 exportVar SKIA_OUT "out/config/android-${TARGET_DEVICE}" | 247 exportVar SKIA_OUT "out/config/android-${TARGET_DEVICE}" |
| 248 } | 248 } |
| 249 | 249 |
| 250 # adb_pull_if_needed(android_src, host_dst) | 250 # adb_pull_if_needed(android_src, host_dst) |
| 251 adb_pull_if_needed() { | 251 adb_pull_if_needed() { |
| 252 | 252 |
| 253 # get adb location | 253 # get adb location |
| 254 source $SCRIPT_DIR/utils/setup_adb.sh | 254 source $SCRIPT_DIR/utils/setup_adb.sh |
| 255 | 255 |
| 256 # read input params | 256 # read input params |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 else | 323 else |
| 324 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST | 324 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST |
| 325 fi | 325 fi |
| 326 } | 326 } |
| 327 | 327 |
| 328 # Set up the device. | 328 # Set up the device. |
| 329 setup_device "${DEVICE_ID}" | 329 setup_device "${DEVICE_ID}" |
| 330 if [[ "$?" != "0" ]]; then | 330 if [[ "$?" != "0" ]]; then |
| 331 exit 1 | 331 exit 1 |
| 332 fi | 332 fi |
| OLD | NEW |