| 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)
|
|
|