diff options
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() |