diff options
author | james.wei@intel.com <james.wei@intel.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-11 02:47:35 +0000 |
---|---|---|
committer | james.wei@intel.com <james.wei@intel.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-11 02:47:35 +0000 |
commit | 0c13006a7f6556e8130f541f8ca4c034ccbeb4c4 (patch) | |
tree | 4832d4e5fed07b14477d84b18b8908fe06c0aca1 /build | |
parent | e57055b82b0e70b6ef30a5e5a4ef1854ff8a9729 (diff) | |
download | chromium_src-0c13006a7f6556e8130f541f8ca4c034ccbeb4c4.zip chromium_src-0c13006a7f6556e8130f541f8ca4c034ccbeb4c4.tar.gz chromium_src-0c13006a7f6556e8130f541f8ca4c034ccbeb4c4.tar.bz2 |
fix issue of -o option deprecated in latest sdk update with --all instead when installing android build deps.
this issue is cloned from https://chromiumcodereview.appspot.com/10164002/ for ownership issue.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10261036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136491 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-x | build/install-build-deps-android-sdk.sh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/build/install-build-deps-android-sdk.sh b/build/install-build-deps-android-sdk.sh index 1709845..8e068a9 100755 --- a/build/install-build-deps-android-sdk.sh +++ b/build/install-build-deps-android-sdk.sh @@ -107,8 +107,18 @@ if [[ "$found" = "0" ]]; then # This will take a little bit long time. echo "Install platform, platform-tool and tool ..." - "${ANDROID_SDK_ROOT}"/tools/android update sdk -o --no-ui \ - --filter platform,platform-tool,tool,system-image + # Check the SDK revision + SDK_VER=$(sed '/^\#/d' ${ANDROID_SDK_ROOT}/tools/source.properties | \ + grep 'Pkg.Revision' |tail -n 1 | cut -d "=" -f2- | \ + sed 's/^[[:space:]]*//;s/[[:space:]]*$//') + if [[ ${SDK_VER} -lt 17 ]]; then + update_flag=" -o " + else + update_flag=" --all " + fi + # Updates the SDK to latest version firstly. + "${ANDROID_SDK_ROOT}"/tools/android update sdk ${update_flag} --no-ui \ + --filter platform,platform-tool,tool,system-image fi # Create a Android Virtual Device named 'buildbot' with default hardware |