update-copyright.py: don't touch *.inc.* files.

This commit is contained in:
Andrei Alexeyev 2018-04-18 01:42:16 +03:00
parent af7c4bbb4f
commit c0ee72d58b
No known key found for this signature in database
GPG key ID: 363707CD4C7FE8A4
2 changed files with 5 additions and 10 deletions

View file

@ -1,6 +1,6 @@
#!/usr/bin/env python3
import pathlib, sys, re, itertools
import pathlib, sys, re, itertools, contextlib
header = r"""\1/*
* This software is licensed under the terms of the MIT-License
@ -18,4 +18,8 @@ header_regex = re.compile(r'^(#if 0.*?\s#endif\s*)?(?:\s*?/\*.*?\*/)?(?:\s*?(\n#
if __name__ == '__main__':
for path in itertools.chain(*((pathlib.Path(__file__).parent.parent / 'src').glob(p) for p in ('**/*.[ch]', '**/*.[ch].in'))):
with contextlib.suppress(IndexError):
if path.suffixes[-2] == '.inc':
continue
path.write_text(header_regex.sub(header, path.read_text(), 1))

View file

@ -1,12 +1,3 @@
/*
* This software is licensed under the terms of the MIT-License
* See COPYING for further information.
* ---
* Copyright (c) 2011-2018, Lukas Weber <laochailan@web.de>.
* Copyright (c) 2012-2018, Andrei Alexeyev <akari@alienslab.net>.
*/
#include "taisei.h"
LAYER(PLAYER_SHOT)
LAYER(PARTICLE_LOW)