forked from bartvdbraak/blender
CMake: only write edited file when changes made
Caused cmake to run after every icon update.
This commit is contained in:
parent
0d69dfbfc1
commit
d63b66be82
@ -27,6 +27,7 @@ def edit_text_file(filename, marker_begin, marker_end, content):
|
||||
return
|
||||
marker_begin_index += len(marker_begin) + 1
|
||||
data_update = data[:marker_begin_index] + content + data[marker_end_index:]
|
||||
if data != data_update:
|
||||
with open(filename, 'w', encoding='utf-8') as f:
|
||||
f.write(data_update)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user