only rewrite utility files if contents changed

This commit is contained in:
Mike Fährmann
2023-01-27 18:04:13 +01:00
parent 0d818d3540
commit e60ec1699a
7 changed files with 52 additions and 13 deletions

View File

@@ -46,5 +46,5 @@ for action in option.build_parser()._actions:
PATH = util.path("data/completion/_gallery-dl")
with open(PATH, "w", encoding="utf-8") as file:
with util.lazy(PATH) as file:
file.write(TEMPLATE % {"opts": " \\\n".join(opts)})