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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/assets/material-design-icons.sha1 ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/tools/download_material_design_icons
diff --git a/sky/tools/download_material_design_icons b/sky/tools/download_material_design_icons
new file mode 100755
index 0000000000000000000000000000000000000000..fd08a1dd34ac7f197e1a4bee3215e3068ded9df6
--- /dev/null
+++ b/sky/tools/download_material_design_icons
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+# Copyright (c) 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+import subprocess
+
+from webkitpy.common.system import filesystem
+from webkitpy.common.webkit_finder import WebKitFinder
jamesr 2015/02/24 22:09:47 lol
+
+finder = WebKitFinder(filesystem.FileSystem())
+
+assets_dir = finder.path_from_chromium_base('sky', 'assets')
+sha1_path = os.path.join(assets_dir, 'material-design-icons.sha1')
+
+with open(sha1_path) as f:
+ sha1 = f.read()
+
+tgz_path = os.path.join(assets_dir, 'material-design-icons.tgz')
+subprocess.call([
+ 'download_from_google_storage',
+ '--no_resume',
+ '--no_auth',
+ '--bucket', 'mojo',
+ '--output', tgz_path,
+ 'material-design-icons/%s' % sha1,
+])
+
+output_path = os.path.join(assets_dir, tgz_path)
+subprocess.call([
+ 'tar', '-xzf', output_path, '-C', assets_dir
+])
+
+os.unlink(tgz_path)
« 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