Skip to content

Commit

Permalink
fix issue of -o option deprecated in latest sdk update with --all ins…
Browse files Browse the repository at this point in the history
…tead 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
  • Loading branch information
james.wei@intel.com committed May 11, 2012
1 parent e57055b commit 0c13006
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions build/install-build-deps-android-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0c13006

Please sign in to comment.