Chromium Code Reviews| Index: build/install-build-deps-android.sh |
| diff --git a/build/install-build-deps-android.sh b/build/install-build-deps-android.sh |
| index cf873811131633b68525736780ac0dcc3e0b8ff6..65b51f8728d2d6542b2fbd6a778f4bd8b7564231 100755 |
| --- a/build/install-build-deps-android.sh |
| +++ b/build/install-build-deps-android.sh |
| @@ -97,4 +97,31 @@ if test "$skip_inst_sdk_packages" != 1; then |
| "$(dirname "${BASH_SOURCE[0]}")/install-android-sdks.sh" |
| fi |
| +DownloadFromBucket() { |
| + bin=$1 |
| + path=$2 |
| + gs_url=$3 |
| + known_hash=$4 |
| + tmpfile=${bin}_$(/bin/date +%s) |
| + if [ ! -x ${path}/${bin} ]; then |
| + /b/build/scripts/slave/gsutil cp ${gs_url} ${tmpfile} |
| + md5=$(md5sum ${tmpfile} | cut -d' ' -f 1) |
| + if [[ $known_hash == $md5 ]]; then |
| + /usr/bin/sudo /bin/mv ${tmpfile} ${path}/${bin} |
| + /usr/bin/sudo /bin/chmod a+x ${path}/${bin} |
| + /usr/bin/sudo /bin/chown root:root ${path}/${bin} |
| + else |
| + echo 'WARNING: Bad md5sum; not installing' ${bin} |
|
Ryan Tseng
2015/08/13 17:48:28
exit 1?
navabi
2015/08/13 18:08:27
Done.
|
| + fi |
| + fi |
| +} |
| + |
| +DownloadFromBucket apktool /usr/local/bin \ |
| +'gs://chromium-apktool-bucket/apktool_1_5_2/apktool' \ |
| +89d099df9f8b12c043dc74f6f1368f36 |
| + |
| +DownloadFromBucket apktool.jar /usr/local/bin \ |
| +'gs://chromium-apktool-bucket/apktool_1_5_2/apktool.jar' \ |
| +2d616934a8eaa37c4501868f05c62871 |
| + |
| echo "install-build-deps-android.sh complete." |