script to attach license info to module files
This commit is contained in:
parent
c86e684227
commit
a457b749d3
13
modules/attach-license-header.py
Normal file
13
modules/attach-license-header.py
Normal file
@ -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)
|
Loading…
x
Reference in New Issue
Block a user