1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Prevent rewriting Updater_Signing.h if content unchanged (#7627)

This commit is contained in:
Harald 2020-10-03 21:47:30 +02:00 committed by GitHub
parent d0300806cd
commit 8b8639e833
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,6 +74,13 @@ def main():
outdir = os.path.dirname(args.out)
if not os.path.exists(outdir):
os.makedirs(outdir)
try:
with open(args.out, "r") as inp:
old_val = inp.read()
if old_val == val:
return
except Exception:
pass
with open(args.out, "w") as f:
f.write(val)
return 0