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

Unified Diff: third_party/instrumented_libraries/scripts/download_binaries.py

Issue 2197603002: Make instrumented_libraries download script src-independent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/instrumented_libraries/scripts/download_binaries.py
diff --git a/third_party/instrumented_libraries/scripts/download_binaries.py b/third_party/instrumented_libraries/scripts/download_binaries.py
index 83ec7b6aa86ab9592c8661a88d03e046bef13f6a..869e766344fef3f7965abbf2607f1cc6d26d3c3e 100755
--- a/third_party/instrumented_libraries/scripts/download_binaries.py
+++ b/third_party/instrumented_libraries/scripts/download_binaries.py
@@ -10,6 +10,15 @@ import re
import subprocess
import sys
+
+SCRIPT_PATH = os.path.abspath(__file__)
+BASE_PATH = os.path.normpath(os.path.join(SCRIPT_PATH, *(4 * ['..'])))
+
+# This defaults to the consuming project's base directory, e.g. 'src' in
+# chromium.
+BASE_DIR = os.path.basename(BASE_PATH)
+
+
def get_ubuntu_release():
supported_releases = ['precise', 'trusty']
release = subprocess.check_output(['lsb_release', '-cs']).strip()
@@ -45,7 +54,8 @@ def main(args):
archive_name = get_archive_name(gyp_defines)
sha1file = '%s.sha1' % archive_name
- target_directory = 'src/third_party/instrumented_libraries/binaries/'
+ target_directory = os.path.join(
+ BASE_DIR, 'third_party', 'instrumented_libraries', 'binaries')
subprocess.check_call([
'download_from_google_storage',
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698