aboutsummaryrefslogtreecommitdiffhomepage
path: root/platform_tools/android/bin/download_toolchains.py
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-29 13:26:32 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-29 13:26:32 +0000
commit6320e8f393539b7a536b32b5a072a474709da5ff (patch)
tree83420d4b43486a23aac1c9ebc842df1216ca3911 /platform_tools/android/bin/download_toolchains.py
parent0a4805e33f8ddb445a2fd061462e715e1707f049 (diff)
Remove dependency of gsutil to download ndk
Currently we use gsutil to download ndk. However, it requires extra steps to install, and is not convenient to configure (several steps to enable Google storage), especially for developers behind proxy (need to set config of boto). Chromium provides some python scripts to help download nacl toolchains that can meet this need well. So this patch basically borrows two python scripts from there, and makes some according changes to remove the usage of gsutil. With new script, we may also implement some advanced features, such as hash check, so that the download would be more intelligent. BUG= R=djsollen@google.com, borenet@google.com, reed@google.com Author: yang.gu@intel.com Review URL: https://chromiumcodereview.appspot.com/15951008 git-svn-id: http://skia.googlecode.com/svn/trunk@9311 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'platform_tools/android/bin/download_toolchains.py')
-rwxr-xr-xplatform_tools/android/bin/download_toolchains.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/platform_tools/android/bin/download_toolchains.py b/platform_tools/android/bin/download_toolchains.py
new file mode 100755
index 0000000000..9922283dc0
--- /dev/null
+++ b/platform_tools/android/bin/download_toolchains.py
@@ -0,0 +1,19 @@
+#!/usr/bin/python
+
+"""Download all toolchains for this platform.
+
+This module downloads multiple tgz's.
+"""
+
+import download_utils
+import sys
+
+url = sys.argv[1]
+filepath = sys.argv[2]
+
+try:
+ download_utils.SyncURL(url, filepath)
+ exit(0)
+except download_utils.HashError, e:
+ exit(1)
+