skia2/platform_tools/android/bin/download_toolchains.py
commit-bot@chromium.org 6320e8f393 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
2013-05-29 13:26:32 +00:00

20 lines
287 B
Python
Executable File

#!/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)