Index: download_golang.py |
=================================================================== |
--- download_golang.py (revision 293799) |
+++ download_golang.py (working copy) |
@@ -19,18 +19,6 @@ |
import utils |
-def _DownloadFilesFromGoogleStorage(webrtc_deps_path): |
- print 'Downloading files in %s...' % webrtc_deps_path |
- |
- extension = 'bat' if 'win32' in sys.platform else 'py' |
- cmd = ['download_from_google_storage.%s' % extension, |
- '--bucket=chromium-webrtc-resources', |
- '--auto_platform', |
- '--recursive', |
- '--directory', webrtc_deps_path] |
- subprocess.check_call(cmd) |
- |
- |
def _GetGoArchivePathForPlatform(): |
archive_extension = 'zip' if utils.GetPlatform() == 'win' else 'tar.gz' |
return os.path.join(utils.GetPlatform(), 'go.%s' % archive_extension) |
@@ -47,9 +35,10 @@ |
archive_path = os.path.join(golang_path, _GetGoArchivePathForPlatform()) |
old_archive_sha1 = utils.ComputeSHA1(archive_path) |
- _DownloadFilesFromGoogleStorage(golang_path) |
+ utils.DownloadFilesFromGoogleStorage(golang_path) |
- if old_archive_sha1 != utils.ComputeSHA1(archive_path): |
+ if (old_archive_sha1 != utils.ComputeSHA1(archive_path) |
+ or not os.path.exists('go')): |
utils.DeleteDirNextToGclient('go') |
utils.UnpackToWorkingDir(archive_path) |