Skip to content

Commit

Permalink
Prevent rewriting Updater_Signing.h if content unchanged (#7627)
Browse files Browse the repository at this point in the history
  • Loading branch information
mongozmaki committed Oct 3, 2020
1 parent d030080 commit 8b8639e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8b8639e

Please sign in to comment.