jobs - cleaning the mess when using autoconf without swarm mode

This commit is contained in:
bunkerity
2021-06-14 17:58:38 +02:00
parent 52534510ec
commit 491d879fec
6 changed files with 95 additions and 71 deletions

View File

@@ -52,12 +52,13 @@ if __name__ == "__main__" :
#print(config)
# Remove old config
for filename in os.listdir(args.output):
file_path = os.path.join(args.output, filename)
if os.path.isfile(file_path) or os.path.islink(file_path):
os.unlink(file_path)
elif os.path.isdir(file_path):
shutil.rmtree(file_path)
# TODO : remove unnecessary files after rendering
# for filename in os.listdir(args.output):
# file_path = os.path.join(args.output, filename)
# if os.path.isfile(file_path) or os.path.islink(file_path):
# os.unlink(file_path)
# elif os.path.isdir(file_path):
# shutil.rmtree(file_path)
# Generate the files from templates and config
templator = Templator(config, args.templates, args.output, args.target)