Index: sky/sdk/packages/sky/lib/download_material_design_icons |
diff --git a/sky/tools/download_material_design_icons b/sky/sdk/packages/sky/lib/download_material_design_icons |
similarity index 55% |
copy from sky/tools/download_material_design_icons |
copy to sky/sdk/packages/sky/lib/download_material_design_icons |
index fd08a1dd34ac7f197e1a4bee3215e3068ded9df6..6087c48fb89e9c15ebe598d9f5393fd259ed7517 100755 |
--- a/sky/tools/download_material_design_icons |
+++ b/sky/sdk/packages/sky/lib/download_material_design_icons |
@@ -5,27 +5,21 @@ |
import os |
import subprocess |
+import urllib2 |
-from webkitpy.common.system import filesystem |
-from webkitpy.common.webkit_finder import WebKitFinder |
- |
-finder = WebKitFinder(filesystem.FileSystem()) |
- |
-assets_dir = finder.path_from_chromium_base('sky', 'assets') |
+sky_lib_dir = os.path.dirname(os.path.abspath(__file__)) |
+assets_dir = os.path.join(sky_lib_dir, 'assets') |
sha1_path = os.path.join(assets_dir, 'material-design-icons.sha1') |
-with open(sha1_path) as f: |
+with open(sha1_path, 'r') 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, |
-]) |
+url = 'https://storage.googleapis.com/mojo/material-design-icons/%s' % sha1 |
+response = urllib2.urlopen(url) |
+ |
+with open(tgz_path, 'wb') as f: |
+ f.write(response.read()) |
output_path = os.path.join(assets_dir, tgz_path) |
subprocess.call([ |