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/sdk/tools/download_material_design_icons

Issue 990493002: Make package: work like Dart expects in preparation for a Sky SDK (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Works Created 5 years, 9 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2015 The Chromium Authors. All rights reserved. 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 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 subprocess 7 import subprocess
8 8
9 from webkitpy.common.system import filesystem 9 from webkitpy.common.system import filesystem
10 from webkitpy.common.webkit_finder import WebKitFinder 10 from webkitpy.common.webkit_finder import WebKitFinder
abarth-chromium 2015/03/13 20:38:02 This isn't going to work...
11 11
12 finder = WebKitFinder(filesystem.FileSystem()) 12 finder = WebKitFinder(filesystem.FileSystem())
13 13
14 assets_dir = finder.path_from_chromium_base('sky', 'assets') 14 assets_dir = finder.path_from_chromium_base('sky', 'assets')
15 sha1_path = os.path.join(assets_dir, 'material-design-icons.sha1') 15 sha1_path = os.path.join(assets_dir, 'material-design-icons.sha1')
16 16
17 with open(sha1_path) as f: 17 with open(sha1_path) as f:
18 sha1 = f.read() 18 sha1 = f.read()
19 19
20 tgz_path = os.path.join(assets_dir, 'material-design-icons.tgz') 20 tgz_path = os.path.join(assets_dir, 'material-design-icons.tgz')
21 subprocess.call([ 21 subprocess.call([
22 'download_from_google_storage', 22 'download_from_google_storage',
23 '--no_resume', 23 '--no_resume',
24 '--no_auth', 24 '--no_auth',
25 '--bucket', 'mojo', 25 '--bucket', 'mojo',
26 '--output', tgz_path, 26 '--output', tgz_path,
27 'material-design-icons/%s' % sha1, 27 'material-design-icons/%s' % sha1,
28 ]) 28 ])
29 29
30 output_path = os.path.join(assets_dir, tgz_path) 30 output_path = os.path.join(assets_dir, tgz_path)
31 subprocess.call([ 31 subprocess.call([
32 'tar', '-xzf', output_path, '-C', assets_dir 32 'tar', '-xzf', output_path, '-C', assets_dir
33 ]) 33 ])
34 34
35 os.unlink(tgz_path) 35 os.unlink(tgz_path)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698