diff options
author | emkael <emkael@tlen.pl> | 2021-11-21 18:05:49 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2021-11-21 18:05:49 +0100 |
commit | e3a0350c8f1d1f01f1ee747b1e7c83c696a799c6 (patch) | |
tree | e83cf64671b1e08cfb07ad5ff8aa375fa78ee16c /boards/generate.py | |
parent | 1b547768d883d76548aad33ce9dac2dbcf4c61bd (diff) |
Cleaning up extraneous files in board WW generator output path
Diffstat (limited to 'boards/generate.py')
-rw-r--r-- | boards/generate.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/boards/generate.py b/boards/generate.py index 1ab2f62..ed96fee 100644 --- a/boards/generate.py +++ b/boards/generate.py @@ -113,3 +113,9 @@ for config_path in config_dir.glob('*.json'): output_file.write(template) print('Written output file %s' % (output_path), file=sys.stderr) output_files.append(output_path) + +existing_files = Path('output').glob('**/*.*') +for existing_file in existing_files: + if not existing_file.name.startswith('.') and existing_file not in output_files: + print('Extraneous file: %s, deleting' % (existing_file)) + existing_file.unlink() |