From a457b749d36f9d0c315d5d8f73e2c4e0e2d8c55d Mon Sep 17 00:00:00 2001 From: Radovan Bast Date: Sat, 11 Nov 2017 13:40:37 +0100 Subject: [PATCH] script to attach license info to module files --- modules/attach-license-header.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 modules/attach-license-header.py diff --git a/modules/attach-license-header.py b/modules/attach-license-header.py new file mode 100644 index 0000000..43e12b3 --- /dev/null +++ b/modules/attach-license-header.py @@ -0,0 +1,13 @@ +import glob + +license_text = '''# (c) https://github.com/coderefinery/autocmake/blob/master/AUTHORS.md +# licensed under BSD-3: https://github.com/coderefinery/autocmake/blob/master/LICENSE + +''' + +for filename in glob.iglob('**/*.cmake', recursive=True): + with open(filename, 'r') as old: + text = old.read() + with open(filename, 'w') as new: + new.write(license_text) + new.write(text)