diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-07-27 22:33:43 +0100 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-07-27 22:33:43 +0100 |
commit | 152522f1d4637a1749afd88ede8f24d1c312317a (patch) | |
tree | 5f316f125b199cd053deb36899d574d157b9ec03 /scripts | |
parent | 6c3a0b2beb45cecadeeb1235ff64060e993cb2ec (diff) | |
download | YAGE-152522f1d4637a1749afd88ede8f24d1c312317a.tar.gz YAGE-152522f1d4637a1749afd88ede8f24d1c312317a.zip |
Fixing script
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/add_version_headers | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/add_version_headers b/scripts/add_version_headers index bdf9e32e..f5f9d88a 100755 --- a/scripts/add_version_headers +++ b/scripts/add_version_headers @@ -1,8 +1,11 @@ #!/usr/bin/env python # ----------------------------------------------------------------------------- -# add_version_headers.py -- Add version header +# add_version_headers.py # -# Copyright (c) 2017 Yann Herklotz Grave (ymherklotz@gmail.com) -- MIT License +# Add version header +# +# Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com> -- MIT License +# See file LICENSE for more details # ----------------------------------------------------------------------------- import os @@ -23,18 +26,17 @@ header = """/* ---------------------------------------------------------------\ def main(argv): - print("files getting a license: ") for subdir, dirs, files in os.walk(os.getcwd()): if not re.match(".*build.*", subdir): for file_ in files: if re.match(".*[.]cpp$|.*[.]hpp$", file_) and not re.match("^picopng[.]cpp$", file_): - print(os.path.join(subdir, file_)) + print(os.path.join(subdir, file_), end=" ") with open(os.path.join(subdir, file_), 'r') as src_file: src = src_file.read() with open(os.path.join(subdir, file_), 'w') as src_file_lic: src_file_lic.write(header.format(file_)) src_file_lic.write(src) - print("Done") + print("-- done") if __name__ == "__main__": |