diff options
author | pauljensen <pauljensen@chromium.org> | 2015-02-02 05:53:06 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-02 13:54:27 +0000 |
commit | cc5297cfe2d5cbf1d61aa942308f5fb93adf3e89 (patch) | |
tree | 6559c7d773c71e9a59a4dcccc431b40db518c283 | |
parent | 7949a66919a6d288451e3a818a843ea39025bd74 (diff) | |
download | chromium_src-cc5297cfe2d5cbf1d61aa942308f5fb93adf3e89.zip chromium_src-cc5297cfe2d5cbf1d61aa942308f5fb93adf3e89.tar.gz chromium_src-cc5297cfe2d5cbf1d61aa942308f5fb93adf3e89.tar.bz2 |
Fix install-build-deps-android.sh launching of get_sdk_extras_packages.py
This is a two part fix:
1. Fix get_sdk_extras_packages.py to correctly identify its own location.
2. Fix install-build-deps-android.sh to launch get_sdk_extras_packages.py
when the current-working-directory isn't the location of the script.
This fixes the script when run in the way recommended by
https://code.google.com/p/chromium/wiki/AndroidBuildInstructions
Review URL: https://codereview.chromium.org/869633003
Cr-Commit-Position: refs/heads/master@{#314140}
-rwxr-xr-x | build/get_sdk_extras_packages.py | 2 | ||||
-rwxr-xr-x | build/install-build-deps-android.sh | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/build/get_sdk_extras_packages.py b/build/get_sdk_extras_packages.py index 32e5564..6d870cc 100755 --- a/build/get_sdk_extras_packages.py +++ b/build/get_sdk_extras_packages.py @@ -7,7 +7,7 @@ import json import os import sys -SDK_EXTRAS_JSON_FILE = os.path.join(os.path.dirname(sys.argv[0]), +SDK_EXTRAS_JSON_FILE = os.path.join(os.path.dirname(__file__), 'android_sdk_extras.json') def main(): diff --git a/build/install-build-deps-android.sh b/build/install-build-deps-android.sh index 4233c7f..5d95ed5 100755 --- a/build/install-build-deps-android.sh +++ b/build/install-build-deps-android.sh @@ -94,10 +94,10 @@ fi if test "$skip_inst_sdk_packages" != 1; then echo 'checking for sdk packages install' - # Get the SDK extras packages to install from the DEPS file 'sdkextras' hook. - packages="$(python -c 'execfile("./get_sdk_extras_packages.py")')" # 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," | \ |