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

Unified Diff: infra/bots/assets/svg/create.py

Issue 2235763002: Add "svg" asset (Closed) Base URL: https://skia.googlesource.com/skia@svgs
Patch Set: Initial upload Created 4 years, 4 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 | « infra/bots/assets/svg/common.py ('k') | infra/bots/assets/svg/create_and_upload.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/bots/assets/svg/create.py
diff --git a/infra/bots/assets/scripts/create.py b/infra/bots/assets/svg/create.py
similarity index 52%
copy from infra/bots/assets/scripts/create.py
copy to infra/bots/assets/svg/create.py
index 4f176085fbde447b9e5dca925f6c5e47fee08ef7..543831a8b57b9346bf30a0f76f632b5fc5a02165 100755
--- a/infra/bots/assets/scripts/create.py
+++ b/infra/bots/assets/svg/create.py
@@ -10,11 +10,27 @@
import argparse
+import common
+import subprocess
+import os
+
+
+SVG_TOOLS = os.path.join(common.INFRA_BOTS_DIR, os.pardir, os.pardir, 'tools',
+ 'svg')
def create_asset(target_dir):
"""Create the asset."""
- raise NotImplementedError('Implement me!')
+ target_dir = os.path.realpath(target_dir)
+
+ if not os.path.exists(target_dir):
+ os.makedirs(target_dir)
+
+ download_svgs_cmd = [
+ 'python', os.path.join(SVG_TOOLS, 'svg_downloader.py'),
+ '--output_dir', target_dir,
+ ]
+ subprocess.check_call(download_svgs_cmd)
def main():
« no previous file with comments | « infra/bots/assets/svg/common.py ('k') | infra/bots/assets/svg/create_and_upload.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698