Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: sky/tools/download_material_design_icons

Issue 951063006: Add a script to download material design assets from gs (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/assets/material-design-icons.sha1 ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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)
OLDNEW
« no previous file with comments | « sky/assets/material-design-icons.sha1 ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698