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

Side by Side Diff: platform_tools/barelinux/bin/arm64_download

Issue 183883020: Make arm64 test script comaptable with old versions of gsutil. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 9 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/sh 1 #!/bin/sh
2 2
3 # Copyright 2014 Google Inc. 3 # Copyright 2014 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 usage() { 9 usage() {
10 cat >&2 <<EOF 10 cat >&2 <<EOF
(...skipping 27 matching lines...) Expand all
38 if [ $ret != 0 ] ; then 38 if [ $ret != 0 ] ; then
39 echo "'$@' failed and returned ${ret}." >&2 39 echo "'$@' failed and returned ${ret}." >&2
40 return $ret 40 return $ret
41 fi 41 fi
42 } 42 }
43 43
44 gsutil_check_get() { 44 gsutil_check_get() {
45 local gurl="$1" 45 local gurl="$1"
46 local file="$2" 46 local file="$2"
47 if ! [ -f "$file" ] || \ 47 if ! [ -f "$file" ] || \
48 [ "$(gsutil stat "$gurl" | sed -n 's/\W*Hash (md5):\W*//p')" \ 48 [ "$(gsutil ls -L "$gurl" | sed -n 's/\W*Hash (md5):\W*//p')" \
49 != "$(md5sum < "$file" | sed 's/\W*-//')" ] ; then 49 != "$(md5sum < "$file" | sed 's/\W*-//')" ] ; then
50 try gsutil cp "$gurl" "$file" || return 50 try gsutil cp "$gurl" "$file" || return
51 fi 51 fi
52 } 52 }
53 53
54 download_compiler() { 54 download_compiler() {
55 local working_dir="$1" 55 local working_dir="$1"
56 local location="$2" 56 local location="$2"
57 local toolchain="$3" 57 local toolchain="$3"
58 58
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 158 }
159 159
160 for command in gsutil xz tar gunzip; do 160 for command in gsutil xz tar gunzip; do
161 try command -v "$command" > /dev/null || usage || exit 161 try command -v "$command" > /dev/null || usage || exit
162 done 162 done
163 163
164 if [ -z "$1" ] ; then 164 if [ -z "$1" ] ; then
165 usage || exit 165 usage || exit
166 fi 166 fi
167 try arm64_download "$1" || exit 167 try arm64_download "$1" || exit
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