Changeset: 1a51457f7c73 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/1a51457f7c73 Modified Files: misc/python/fixlicense.py Branch: Dec2023 Log Message:
Add .pc extension, and better handle #!. diffs (27 lines): diff --git a/misc/python/fixlicense.py b/misc/python/fixlicense.py --- a/misc/python/fixlicense.py +++ b/misc/python/fixlicense.py @@ -95,6 +95,7 @@ suffixrules = { '.java': ('/*', ' */', ' * ', '', True), # Java source '.l': ('/*', ' */', ' * ', '', True), # (f)lex source '.mal': ('', '', '# ', '', True), # MonetDB Assembly Language + '.pc': ('', '', '# ', '', True), # Package config source '.php': ('<?php', '?>', '# ', '', True), # PHP source '.pl': ('', '', '# ', '', True), # Perl source '.pm': ('', '', '# ', '', True), # Perl module source @@ -137,7 +138,14 @@ def getcomments(file, pre=None, post=Non line = f.readline() f.close() if line[:2] == '#!': - ext = '.sh' + if 'bash' in line or '/sh' in line: + ext = '.sh' + elif 'python' in line or 'PYTHON' in line: + ext = '.py' + elif 'perl' in line: + ext = '.pl' + elif 'make' in line: + ext = 'Makefile' else: return '', '', '', '', '', True pre, post, start, end, nl = suffixrules[ext] _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org