From c86e684227e6c675f42c13e56f55dd65fc4ad7ef Mon Sep 17 00:00:00 2001 From: Radovan Bast Date: Sat, 11 Nov 2017 13:40:23 +0100 Subject: [PATCH] generate README.md with license information --- update.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/update.py b/update.py index ae0c2ad..b4294ac 100644 --- a/update.py +++ b/update.py @@ -11,6 +11,15 @@ if sys.version_info[0] == 2 and sys.version_info[1] < 7: AUTOCMAKE_GITHUB_URL = 'https://github.com/coderefinery/autocmake/raw/master/' +def licensing_info(): + return '''The CMake infrastructure for this project is generated using [Autocmake] +by Radovan Bast, Roberto Di Remigio, Jonas Juselius and contributors. +The `update.py` Python script and the contents of the directories `autocmake` and `downloaded` are licensed +under the terms of the [BSD-3-Clause license], unless otherwise stated. + +[Autocmake]: http://autocmake.org +[BSD-3-Clause license]: https://tldrlegal.com/license/bsd-3-clause-license-(revised)''' + def check_for_yaml(): try: @@ -257,6 +266,10 @@ def main(argv): src='{0}{1}'.format(AUTOCMAKE_GITHUB_URL, f), dst='{0}'.format(f) ) + # finally create a README.md with licensing information + with open('README.md', 'w') as f: + print('- generating licensing information') + f.write(licensing_info()) sys.exit(0) process_yaml(argv)