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 # Fail-fast if anything in the script fails. | 5 # Fail-fast if anything in the script fails. |
6 set -e | 6 set -e |
7 | 7 |
8 BUILDTYPE=${BUILDTYPE-Debug} | 8 BUILDTYPE=${BUILDTYPE-Debug} |
9 | 9 |
10 while (( "$#" )); do | 10 while (( "$#" )); do |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 ;; | 139 ;; |
140 esac | 140 esac |
141 | 141 |
142 verbose "The build is targeting the device: $TARGET_DEVICE" | 142 verbose "The build is targeting the device: $TARGET_DEVICE" |
143 exportVar DEVICE_ID $TARGET_DEVICE | 143 exportVar DEVICE_ID $TARGET_DEVICE |
144 | 144 |
145 # setup the appropriate cross compiling toolchains | 145 # setup the appropriate cross compiling toolchains |
146 source $SCRIPT_DIR/utils/setup_toolchain.sh | 146 source $SCRIPT_DIR/utils/setup_toolchain.sh |
147 | 147 |
148 DEFINES="${DEFINES} android_toolchain=${TOOLCHAIN_TYPE}" | 148 DEFINES="${DEFINES} android_toolchain=${TOOLCHAIN_TYPE}" |
| 149 |
149 exportVar GYP_DEFINES "$DEFINES $GYP_DEFINES" | 150 exportVar GYP_DEFINES "$DEFINES $GYP_DEFINES" |
150 | 151 exportVar SKIA_OUT "${SKIA_OUT:-out/config/android-${TARGET_DEVICE}}" |
151 SKIA_SRC_DIR=$(cd "${SCRIPT_DIR}/../../.."; pwd) | |
152 DEFAULT_SKIA_OUT="${SKIA_SRC_DIR}/out/config/android-${TARGET_DEVICE}" | |
153 exportVar SKIA_OUT "${SKIA_OUT:-${DEFAULT_SKIA_OUT}}" | |
154 } | 152 } |
155 | 153 |
156 # adb_pull_if_needed(android_src, host_dst) | 154 # adb_pull_if_needed(android_src, host_dst) |
157 adb_pull_if_needed() { | 155 adb_pull_if_needed() { |
158 | 156 |
159 # get adb location | 157 # get adb location |
160 source $SCRIPT_DIR/utils/setup_adb.sh | 158 source $SCRIPT_DIR/utils/setup_adb.sh |
161 | 159 |
162 # read input params | 160 # read input params |
163 ANDROID_SRC="$1" | 161 ANDROID_SRC="$1" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 echo -n "$ANDROID_DST " | 218 echo -n "$ANDROID_DST " |
221 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST | 219 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST |
222 fi | 220 fi |
223 else | 221 else |
224 echo -n "$ANDROID_DST " | 222 echo -n "$ANDROID_DST " |
225 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST | 223 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST |
226 fi | 224 fi |
227 } | 225 } |
228 | 226 |
229 setup_device "${DEVICE_ID}" | 227 setup_device "${DEVICE_ID}" |
OLD | NEW |