Commit 5e8ca465 authored by Ille, Ondrej, Ing.'s avatar Ille, Ondrej, Ing.

Updated license text and license script.

parent 84e808b6
CTU CAN FD IP Core
Copyright (C) 2015-2018 Ondrej Ille <ondrej.ille@gmail.com>
Copyright (C) 2015-2018
Project advisors and co-authors:
Authors:
Ondrej Ille <ondrej.ille@gmail.com>
Martin Jerabek <jerabma7@fel.cvut.cz>
Project advisors:
Jiri Novak <jnovak@fel.cvut.cz>
Pavel Pisa <pisa@cmp.felk.cvut.cz>
Martin Jerabek <jerabma7@fel.cvut.cz>
Department of Measurement (http://meas.fel.cvut.cz/)
Faculty of Electrical Engineering (http://www.fel.cvut.cz)
Czech Technical University (http://www.cvut.cz/)
......@@ -32,4 +36,3 @@ The CAN protocol is developed by Robert Bosch GmbH and protected by patents.
Anybody who wants to implement this IP core on silicon has to obtain a CAN
protocol license from Bosch.
<licend1234>
\ No newline at end of file
......@@ -29,6 +29,8 @@ import shutil
import re
import io
from io import StringIO
################################################################################
## Global variables
################################################################################
......@@ -81,13 +83,15 @@ def write_license(lic_text, comment_char, file):
file.write("\n")
# Write rest of the lines
# Write rest of the lines
buf = io.StringIO(lic_text)
i = 0
while True:
i = i + 1
# Read the line from text of the license
lic_line = buf.readline()
if (lic_line == "<licend1234>"):
if (not(str.find("<licend1234>", lic_line) == -1)):
break
# Write Begining of the line
......@@ -159,7 +163,7 @@ def process_file(filename):
if (file_ext_match == False):
return
print("Processing file: "+filename)
print("Processing file: " + filename)
## Check the comment sign based on file type
if (ext_type == ".c"):
......@@ -178,10 +182,10 @@ def process_file(filename):
temp_file = open ("temp.txt","wt")
## Write the new license to the temp file
write_license(lic_text,comment_sign, temp_file)
write_license(lic_text, comment_sign, temp_file)
## Write rest of the file after license update
write_source(file,temp_file, comment_sign)
write_source(file, temp_file, comment_sign)
temp_file.close()
file.close()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment