Add a script to download material design assets from gs
We're going to use these assets to make pretty demos of Sky but not every developer needs them in their working copy. R=eseidel@chromium.org, jamesr@chromium.org Review URL: https://codereview.chromium.org/951063006
This commit is contained in:
parent
46d78892e7
commit
da65a22fca
1
engine/src/flutter/assets/.gitignore
vendored
Normal file
1
engine/src/flutter/assets/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
material-design-icons
|
1
engine/src/flutter/assets/material-design-icons.sha1
Normal file
1
engine/src/flutter/assets/material-design-icons.sha1
Normal file
@ -0,0 +1 @@
|
|||||||
|
38ab35b5e5a6907852ad6e1a8e4a93da02f79591
|
35
engine/src/flutter/tools/download_material_design_icons
Executable file
35
engine/src/flutter/tools/download_material_design_icons
Executable file
@ -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
|
||||||
|
|
||||||
|
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)
|
Loading…
x
Reference in New Issue
Block a user