OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2014 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2014 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import os | 6 import os |
7 import stat | 7 import stat |
8 import subprocess | 8 import subprocess |
9 import sys | |
9 | 10 |
10 from webkitpy.common.system import filesystem | 11 from webkitpy.common.system import filesystem |
11 from webkitpy.common.webkit_finder import WebKitFinder | 12 from webkitpy.common.webkit_finder import WebKitFinder |
12 | 13 |
14 PLATFORM_MAPPING = { | |
15 'cygwin': 'win', | |
16 'darwin': 'mac', | |
17 'linux2': 'linux', | |
jamesr
2015/05/21 21:33:05
i wouldn't add win entries and instead of checking
| |
18 'win32': 'win', | |
19 } | |
20 | |
21 sha1 = 'sky_server_' + PLATFORM_MAPPING[sys.platform] + '.sha1' | |
22 | |
13 finder = WebKitFinder(filesystem.FileSystem()) | 23 finder = WebKitFinder(filesystem.FileSystem()) |
14 | 24 |
15 output_file_ = finder.path_from_chromium_base('out', 'downloads', 'sky_server') | 25 output_file_ = finder.path_from_chromium_base('out', 'downloads', 'sky_server') |
16 subprocess.call([ | 26 subprocess.call([ |
17 'download_from_google_storage', | 27 'download_from_google_storage', |
18 '--no_resume', | 28 '--no_resume', |
19 '--no_auth', | 29 '--no_auth', |
20 '--bucket', 'mojo', | 30 '--bucket', 'mojo', |
21 '--sha1_file', finder.path_from_chromium_base('sky', 'tools', 'skygo', 'sky_ server.sha1'), | 31 '--sha1_file', finder.path_from_chromium_base('sky', 'tools', 'skygo', sha1) , |
22 '--output', output_file_ | 32 '--output', output_file_ |
23 ]) | 33 ]) |
24 os.chmod(output_file_, os.stat(output_file_).st_mode | stat.S_IEXEC) | 34 os.chmod(output_file_, os.stat(output_file_).st_mode | stat.S_IEXEC) |
OLD | NEW |