Chromium Code Reviews| Index: build/install-android-sdks.sh |
| diff --git a/build/install-android-sdks.sh b/build/install-android-sdks.sh |
| new file mode 100755 |
| index 0000000000000000000000000000000000000000..5c4edafec5b4a4ff85d148a4784209c55d698a22 |
| --- /dev/null |
| +++ b/build/install-android-sdks.sh |
| @@ -0,0 +1,25 @@ |
| +#!/bin/bash -e |
| + |
| +# Copyright (c) 2012 The Chromium Authors. All rights reserved. |
|
cjhopman
2015/02/10 21:09:19
nit: update copyright
lisandrop
2015/02/10 21:40:28
Done.
|
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +# Script to install SDKs needed to build chromium on android. |
| +# See http://code.google.com/p/chromium/wiki/AndroidBuildInstructions |
| + |
| +echo 'checking for sdk packages install' |
| +# Use absolute path to call 'android' so script can be run from any directory. |
| +cwd=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| +# Get the SDK extras packages to install from the DEPS file 'sdkextras' hook. |
| +packages="$(python ${cwd}/get_sdk_extras_packages.py)" |
| +for package in "${packages}"; do |
| + pkg_id=$(${cwd}/../third_party/android_tools/sdk/tools/android list sdk | \ |
| + grep -i "$package," | \ |
| + awk '/^[ ]*[0-9]*- / {gsub("-",""); print $1}') |
| + if [[ -n ${pkg_id} ]]; then |
| + ${cwd}/../third_party/android_tools/sdk/tools/android update sdk --no-ui \ |
| + --filter ${pkg_id} |
| + fi |
| +done |
| + |
| +echo "install-android-sdks.sh complete." |