Generate the contents of the git_sha1.h file.
"""
-
import argparse
import os
import os.path
git_sha1 = ''
return git_sha1
+
def write_if_different(contents):
"""
Avoid touching the output file if it doesn't need modifications
with open(args.output, 'w') as file:
file.write(contents)
+
parser = argparse.ArgumentParser()
parser.add_argument('--output', help='File to write the #define in',
required=True)