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

Unified Diff: mojo/tools/deploy_domokit_site.py

Issue 1185473002: Move sky_home.* from domokit.github.io into our repo (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | sky/sky_home » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/tools/deploy_domokit_site.py
diff --git a/mojo/tools/deploy_domokit_site.py b/mojo/tools/deploy_domokit_site.py
index ddc12024cbb84d2ea1a6f2e72058a03e632df3af..33264aced62207a98c512967fd4c646fabc87099 100755
--- a/mojo/tools/deploy_domokit_site.py
+++ b/mojo/tools/deploy_domokit_site.py
@@ -69,7 +69,18 @@ def packages_filter(path):
return True
+def ensure_dir_exists(path):
+ if not os.path.exists(path):
+ os.makedirs(path)
+
+
def copy(from_root, to_root, filter_func=None, followlinks=False):
+ assert os.path.exists(from_root), "%s does not exist!" % from_root
+ if os.path.isfile(from_root):
+ ensure_dir_exists(os.path.dirname(to_root))
+ shutil.copy(from_root, to_root)
+ return
+
if os.path.exists(to_root):
shutil.rmtree(to_root)
os.makedirs(to_root)
@@ -125,6 +136,9 @@ def main():
# Copy sky/examples into examples/
copy(src_path('sky/examples'), deploy_path('examples'), examples_filter)
+ copy(src_path('sky/sky_home'), args.deploy_root)
+ copy(src_path('sky/sky_home.dart'), args.deploy_root)
+
# Deep copy packages/. This follows symlinks and flattens them.
packages_root = deploy_path('packages')
copy(dart_pkg_packages_dir, packages_root, packages_filter, True)
« no previous file with comments | « no previous file | sky/sky_home » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698