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:
parent
d0300806cd
commit
8b8639e833
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user