| OLD | NEW | 
|    1 #!/bin/bash -e |    1 #!/bin/bash -e | 
|    2  |    2  | 
|    3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |    3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
|    4 # Use of this source code is governed by a BSD-style license that can be |    4 # Use of this source code is governed by a BSD-style license that can be | 
|    5 # found in the LICENSE file. |    5 # found in the LICENSE file. | 
|    6  |    6  | 
|    7 # Script to install everything needed to build chromium on android, including |    7 # Script to install everything needed to build chromium on android, including | 
|    8 # items requiring sudo privileges. |    8 # items requiring sudo privileges. | 
|    9 # See http://code.google.com/p/chromium/wiki/AndroidBuildInstructions |    9 # See http://code.google.com/p/chromium/wiki/AndroidBuildInstructions | 
|   10  |   10  | 
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   90     grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out |   90     grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out | 
|   91     exit 1 |   91     exit 1 | 
|   92   fi |   92   fi | 
|   93 fi |   93 fi | 
|   94  |   94  | 
|   95 # Install SDK packages for android |   95 # Install SDK packages for android | 
|   96 if test "$skip_inst_sdk_packages" != 1; then |   96 if test "$skip_inst_sdk_packages" != 1; then | 
|   97   "$(dirname "${BASH_SOURCE[0]}")/install-android-sdks.sh" |   97   "$(dirname "${BASH_SOURCE[0]}")/install-android-sdks.sh" | 
|   98 fi |   98 fi | 
|   99  |   99  | 
 |  100 DownloadFromBucket() { | 
 |  101   bin=$1 | 
 |  102   path=$2 | 
 |  103   gs_url=$3 | 
 |  104   known_hash=$4 | 
 |  105   tmpfile=${bin}_$(/bin/date +%s) | 
 |  106   if [ ! -x ${path}/${bin} ]; then | 
 |  107       /b/build/scripts/slave/gsutil cp ${gs_url} ${tmpfile} | 
 |  108       md5=$(md5sum ${tmpfile} | cut -d' ' -f 1) | 
 |  109       if [[ $known_hash == $md5 ]]; then | 
 |  110         /usr/bin/sudo /bin/mv ${tmpfile} ${path}/${bin} | 
 |  111         /usr/bin/sudo /bin/chmod a+x ${path}/${bin} | 
 |  112         /usr/bin/sudo /bin/chown root:root ${path}/${bin} | 
 |  113       else | 
 |  114         echo 'ERROR: Bad md5sum. Not installing' ${bin} | 
 |  115         exit 1 | 
 |  116       fi | 
 |  117   fi | 
 |  118 } | 
 |  119  | 
 |  120 DownloadFromBucket apktool /usr/local/bin \ | 
 |  121 'gs://chromium-apktool-bucket/apktool_1_5_2/apktool' \ | 
 |  122 89d099df9f8b12c043dc74f6f1368f36 | 
 |  123  | 
 |  124 DownloadFromBucket apktool.jar /usr/local/bin \ | 
 |  125 'gs://chromium-apktool-bucket/apktool_1_5_2/apktool.jar' \ | 
 |  126 2d616934a8eaa37c4501868f05c62871 | 
 |  127  | 
|  100 echo "install-build-deps-android.sh complete." |  128 echo "install-build-deps-android.sh complete." | 
| OLD | NEW |