Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Side by Side Diff: platform_tools/android/bin/android_setup.sh

Issue 519743002: Fix adb_pull_if_needed (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 # adb_pull_if_needed(android_src, host_dst) 186 # adb_pull_if_needed(android_src, host_dst)
187 adb_pull_if_needed() { 187 adb_pull_if_needed() {
188 188
189 # get adb location 189 # get adb location
190 source $SCRIPT_DIR/utils/setup_adb.sh 190 source $SCRIPT_DIR/utils/setup_adb.sh
191 191
192 # read input params 192 # read input params
193 ANDROID_SRC="$1" 193 ANDROID_SRC="$1"
194 HOST_DST="$2" 194 HOST_DST="$2"
195 195
196 if [ -d $HOST_DST ];
197 then
198 HOST_DST="${HOST_DST}/$(basename ${ANDROID_SRC})"
199 fi
200
201
202 if [ -f $HOST_DST ]; 196 if [ -f $HOST_DST ];
203 then 197 then
204 #get the MD5 for dst and src 198 #get the MD5 for dst and src
205 ANDROID_MD5=`$ADB $DEVICE_SERIAL shell md5 $ANDROID_SRC` 199 ANDROID_MD5=`$ADB $DEVICE_SERIAL shell md5 $ANDROID_SRC`
206 if [ $(uname) == "Darwin" ]; then 200 if [ $(uname) == "Darwin" ]; then
207 HOST_MD5=`md5 -q $HOST_DST` 201 HOST_MD5=`md5 -q $HOST_DST`
208 else 202 else
209 HOST_MD5=`md5sum $HOST_DST` 203 HOST_MD5=`md5sum $HOST_DST`
210 fi 204 fi
211 205
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 adb_push_if_needed $HOST_SRC $ANDROID_DST 256 adb_push_if_needed $HOST_SRC $ANDROID_DST
263 else 257 else
264 echo -n "$ANDROID_DST " 258 echo -n "$ANDROID_DST "
265 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")" 259 $ADB $DEVICE_SERIAL shell mkdir -p "$(dirname "$ANDROID_DST")"
266 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST 260 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST
267 fi 261 fi
268 fi 262 fi
269 } 263 }
270 264
271 setup_device "${DEVICE_ID}" 265 setup_device "${DEVICE_ID}"
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698