7"""Copy a Dart package into a directory suitable for release."""
16 parser = argparse.ArgumentParser(description=
'Copy a Dart package')
18 parser.add_argument(
'--source', type=str, help=
'Source directory assembled by dart_pkg.py')
19 parser.add_argument(
'--dest', type=str, help=
'Destination directory for the package')
21 args = parser.parse_args()
23 if os.path.exists(args.dest):
24 shutil.rmtree(args.dest)
28 shutil.copytree(args.source, args.dest, ignore=shutil.ignore_patterns(
'packages'))
31if __name__ ==
'__main__':