scripts/copytree.py
raw| 1 | import shutil |
| 2 | |
| 3 | import click |
| 4 | from click import argument, command |
| 5 | |
| 6 | |
| 7 | @command(no_args_is_help=True) |
| 8 | @argument('src', type=click.Path(exists=True)) |
| 9 | @argument('dest', type=click.Path(file_okay=False)) |
| 10 | def f(src: str, dest: str): |
| 11 | """Copy a SRC file/folder to DEST with merging.""" |
| 12 | shutil.copytree(src, dest, dirs_exist_ok=True) |
| 13 | |
| 14 | |
| 15 | if __name__ == '__main__': |
| 16 | f() |