blob: dc64ebf8b80577b6facbe9031954d0c8d25ad3ef [file] [log] [blame]
oprypin3b2fb202017-03-06 02:23:34 -08001#!/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
12These are checked into the repository as SHA-1 hashes (see *.sha1 files in
13subdirectories). Note that chrome-webrtc-resources is a Google-internal bucket,
14so please download and compile these tools manually if this script fails.
15"""
16
17import os
18import subprocess
19import sys
20
21
22SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
23
24
25def main(directories):
26 if not directories:
27 directories = [SCRIPT_DIR]
28
29 for path in directories:
30 cmd = [
31 'download_from_google_storage',
32 '--directory',
33 '--num_threads=10',
34 '--bucket', 'chrome-webrtc-resources',
35 '--auto_platform',
36 '--recursive',
37 path,
38 ]
39 print 'Downloading precompiled tools...'
40 subprocess.check_call(cmd)
41
42
43if __name__ == '__main__':
44 sys.exit(main(sys.argv[1:]))