Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/usr/bin/env python | |
| 2 # Copyright (c) 2015 The Chromium Authors. All rights reserved. | |
| 3 # Use of this source code is governed by a BSD-style license that can be | |
| 4 # found in the LICENSE file. | |
| 5 | |
| 6 import os | |
| 7 import subprocess | |
| 8 | |
| 9 from webkitpy.common.system import filesystem | |
| 10 from webkitpy.common.webkit_finder import WebKitFinder | |
|
jamesr
2015/02/24 22:09:47
lol
| |
| 11 | |
| 12 finder = WebKitFinder(filesystem.FileSystem()) | |
| 13 | |
| 14 assets_dir = finder.path_from_chromium_base('sky', 'assets') | |
| 15 sha1_path = os.path.join(assets_dir, 'material-design-icons.sha1') | |
| 16 | |
| 17 with open(sha1_path) as f: | |
| 18 sha1 = f.read() | |
| 19 | |
| 20 tgz_path = os.path.join(assets_dir, 'material-design-icons.tgz') | |
| 21 subprocess.call([ | |
| 22 'download_from_google_storage', | |
| 23 '--no_resume', | |
| 24 '--no_auth', | |
| 25 '--bucket', 'mojo', | |
| 26 '--output', tgz_path, | |
| 27 'material-design-icons/%s' % sha1, | |
| 28 ]) | |
| 29 | |
| 30 output_path = os.path.join(assets_dir, tgz_path) | |
| 31 subprocess.call([ | |
| 32 'tar', '-xzf', output_path, '-C', assets_dir | |
| 33 ]) | |
| 34 | |
| 35 os.unlink(tgz_path) | |
| OLD | NEW |