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

Side by Side Diff: build/install-android-sdks.sh

Issue 1152203003: Add script to validate installed Android SDK packages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 6 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
OLDNEW
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 SDKs needed to build chromium on android. 7 # Script to install SDKs needed to build chromium on android.
8 # See http://code.google.com/p/chromium/wiki/AndroidBuildInstructions 8 # See http://code.google.com/p/chromium/wiki/AndroidBuildInstructions
9 9
10 echo 'checking for sdk packages install' 10 echo 'checking for sdk packages install'
11 # Use absolute path to call 'android' so script can be run from any directory. 11 # Use absolute path to call 'android' so script can be run from any directory.
12 cwd=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) 12 cwd=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
13 # Get the SDK extras packages to install from the DEPS file 'sdkextras' hook. 13 # Get the SDK extras packages to install from the DEPS file 'sdkextras' hook.
14 packages="$(python ${cwd}/get_sdk_extras_packages.py)" 14 packages="$(python ${cwd}/get_sdk_extras_packages.py)"
15 for package in "${packages}"; do 15 if [[ -n "${packages}" ]]; then
16 pkg_id=$(${cwd}/../third_party/android_tools/sdk/tools/android list sdk | \ 16 ${cwd}/../third_party/android_tools/sdk/tools/android update sdk --no-ui \
17 grep -i "$package," | \ 17 --filter ${packages}
18 awk '/^[ ]*[0-9]*- / {gsub("-",""); print $1}') 18 fi
19 if [[ -n ${pkg_id} ]]; then
20 ${cwd}/../third_party/android_tools/sdk/tools/android update sdk --no-ui \
21 --filter ${pkg_id}
22 fi
23 done
24 19
25 echo "install-android-sdks.sh complete." 20 echo "install-android-sdks.sh complete."
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698