| Index: tools/licenses.py
|
| diff --git a/tools/licenses.py b/tools/licenses.py
|
| index 17dc94a3aab165e29e891a19b42189909aec5750..0da272cc874aecf95cebedfad98b73a8377b2518 100755
|
| --- a/tools/licenses.py
|
| +++ b/tools/licenses.py
|
| @@ -585,8 +585,16 @@ def GenerateCredits(
|
| escape=False)
|
|
|
| if output_file:
|
| - with open(output_file, 'w') as output:
|
| - output.write(template_contents)
|
| + changed = True
|
| + try:
|
| + old_output = open(output_file, 'r').read()
|
| + if old_output == template_contents:
|
| + changed = False
|
| + except:
|
| + pass
|
| + if changed:
|
| + with open(output_file, 'w') as output:
|
| + output.write(template_contents)
|
| else:
|
| print template_contents
|
|
|
|
|