77 |
""" |
""" |
78 |
|
|
79 |
doCopyrightRe = re.compile(r"(//|#)\s*\([cC]\)\s*:?\s*([^\n]+)") |
doCopyrightRe = re.compile(r"(//|#)\s*\([cC]\)\s*:?\s*([^\n]+)") |
80 |
|
doSuffix = re.compile(r"\.(?:java|py|test|pl|PL|c|h|cxx|hxx)$") |
81 |
|
|
82 |
def process_dir(arg, dir, names): |
def process_dir(arg, dir, names): |
83 |
for name in names: |
for name in names: |
125 |
open(file, 'w').write(text) |
open(file, 'w').write(text) |
126 |
else: |
else: |
127 |
# Is this a file type that needs to be copyrighted? |
# Is this a file type that needs to be copyrighted? |
128 |
if re.search(r"\.(?:java|py|test|pl|PL)$", name): |
if re.search(doSuffix, name): |
129 |
m = max([re.search("General Public License", line) |
m = max([re.search("General Public License", line) |
130 |
for line in firstlines]) |
for line in firstlines]) |
131 |
if m == None: |
if m == None: |