| OLD | NEW |
| (Empty) |
| 1 #!/usr/bin/env python | |
| 2 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | |
| 3 # | |
| 4 # Use of this source code is governed by a BSD-style license | |
| 5 # that can be found in the LICENSE file in the root of the source | |
| 6 # tree. An additional intellectual property rights grant can be found | |
| 7 # in the file PATENTS. All contributing project authors may | |
| 8 # be found in the AUTHORS file in the root of the source tree. | |
| 9 | |
| 10 """Downloads precompiled tools. | |
| 11 | |
| 12 These are checked into the repository as SHA-1 hashes (see *.sha1 files in | |
| 13 subdirectories). Note that chrome-webrtc-resources is a Google-internal bucket, | |
| 14 so please download and compile these tools manually if this script fails. | |
| 15 """ | |
| 16 | |
| 17 import os | |
| 18 import subprocess | |
| 19 import sys | |
| 20 | |
| 21 | |
| 22 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) | |
| 23 # Needed to properly resolve PATH and executable extensions on Windows. | |
| 24 USE_SHELL = sys.platform == 'win32' | |
| 25 | |
| 26 | |
| 27 def main(directories): | |
| 28 if not directories: | |
| 29 directories = [SCRIPT_DIR] | |
| 30 | |
| 31 for path in directories: | |
| 32 cmd = [ | |
| 33 'download_from_google_storage', | |
| 34 '--directory', | |
| 35 '--num_threads=10', | |
| 36 '--bucket', 'chrome-webrtc-resources', | |
| 37 '--auto_platform', | |
| 38 '--recursive', | |
| 39 path, | |
| 40 ] | |
| 41 print 'Downloading precompiled tools...' | |
| 42 subprocess.check_call(cmd, shell=USE_SHELL) | |
| 43 | |
| 44 | |
| 45 if __name__ == '__main__': | |
| 46 sys.exit(main(sys.argv[1:])) | |
| OLD | NEW |