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(): |