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

Unified Diff: mojo/public/tools/download_shell_binary.py

Issue 910763002: Expose ability to download network service impl in SDK. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase Created 5 years, 10 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 | « mojo/public/tools/download_network_service.py ('k') | mojo/services/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/download_shell_binary.py
diff --git a/mojo/public/tools/download_shell_binary.py b/mojo/public/tools/download_shell_binary.py
index ee742319d2e148f51c40444624d7724fba60ce29..30891c20e2f37ba5e38702bddea597e7b78ad9de 100755
--- a/mojo/public/tools/download_shell_binary.py
+++ b/mojo/public/tools/download_shell_binary.py
@@ -20,7 +20,7 @@ if not sys.platform.startswith("linux"):
sys.exit(0)
CURRENT_PATH = os.path.dirname(os.path.realpath(__file__))
-PREBUILT_FILE_PATH = os.path.join(CURRENT_PATH, "prebuilt")
+PREBUILT_FILE_PATH = os.path.join(CURRENT_PATH, "prebuilt", "shell")
def download(tools_directory):
@@ -83,11 +83,12 @@ def download_version_for_platform(version, platform, tools_directory):
sys.exit(1)
binary_name = BINARY_FOR_PLATFORM[platform]
+ output_dir = os.path.join(PREBUILT_FILE_PATH, platform)
with zipfile.ZipFile(temp_zip_file.name) as z:
zi = z.getinfo(binary_name)
mode = zi.external_attr >> 16
- z.extract(zi, PREBUILT_FILE_PATH)
- os.chmod(os.path.join(PREBUILT_FILE_PATH, binary_name), mode)
+ z.extract(zi, output_dir)
+ os.chmod(os.path.join(output_dir, binary_name), mode)
def main():
« no previous file with comments | « mojo/public/tools/download_network_service.py ('k') | mojo/services/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698