blob: fc2c82a089e3f9aa9fdd243ff780f2cebe31e987 [file] [log] [blame]
mtklein6af0c952016-07-22 03:34:25 -07001#!/usr/bin/env python
2
3# Copyright 2016 Google Inc.
4#
5# Use of this source code is governed by a BSD-style license that can be
6# found in the LICENSE file.
7
8import subprocess
9import sys
10
11def quiet(*cmd):
12 cmd = ' '.join(cmd).split()
13 subprocess.check_output(cmd)
14
15def gn_path():
16 if 'linux' in sys.platform:
17 return 'buildtools/linux64/gn'
18 if 'darwin' in sys.platform:
19 return 'buildtools/mac/gn'
20 return 'buildtools/win/gn.exe'
21
herb35f3e592016-08-01 12:26:51 -070022def download_tool():
23 if 'linux' in sys.platform or 'darwin' in sys.platform:
24 return 'download_from_google_storage'
25 return 'download_from_google_storage.bat'
26
27quiet(download_tool(),
mtklein6af0c952016-07-22 03:34:25 -070028 '--no_resume --no_auth --bucket chromium-gn',
29 '-s ', gn_path() + '.sha1')