(source_dir, target_dir)
| 27 | |
| 28 | |
| 29 | def copy_source_tree(source_dir, target_dir): |
| 30 | for source in find_source_files(source_dir): |
| 31 | target = os.path.join(target_dir, os.path.relpath(source, source_dir)) |
| 32 | os.makedirs(os.path.dirname(target), exist_ok=True) |
| 33 | if os.path.exists(target): |
| 34 | print('Override', os.path.relpath(target, target_dir)) |
| 35 | else: |
| 36 | print('Add', os.path.relpath(target, target_dir)) |
| 37 | shutil.copy(source, target) |
| 38 | for target in find_source_files(target_dir): |
| 39 | source = os.path.join(source_dir, os.path.relpath(target, target_dir)) |
| 40 | if not os.path.exists(source): |
| 41 | print('Remove', os.path.relpath(target, target_dir)) |
| 42 | os.remove(target) |
| 43 | |
| 44 | |
| 45 | def infer_headers(directory): |
no test coverage detected