Skip to content
Snippets Groups Projects
Commit ff2e9bf4 authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

license script printing modifications/additions

parent 14cebc61
No related branches found
No related tags found
2 merge requests!436Release to start wolf public,!433After 2nd RA-L submission
Pipeline #7595 failed
......@@ -115,12 +115,12 @@ fi
# DETECT AND REMOVE EXISTING LICENSE
if [ "$mode" == "update" ]; then
echo "Recursely removing license header from all files (.c, .cpp, .h, .hpp)"
echo "Recursely removing license header from all files (.c, .cpp, .h, .hpp):"
for i in $file_list
do
if grep -Fxq ${line_start_mark} $i
then
echo " Removing license header from file ${i}"
echo " - ${i}"
line_start="$(grep -wn $line_start_mark ${i} | head -n 1 | cut -d: -f1)"
line_end="$(grep -wn $line_end_mark ${i} | head -n 1 | cut -d: -f1)"
#echo ${line_start}
......@@ -132,12 +132,12 @@ if [ "$mode" == "update" ]; then
fi
# ADD CONTENT OF license-file AT THE BEGINNING OF CODE FILES
echo "Recursively adding license header to all files (.c, .cpp, .h, .hpp)"
echo "Recursively adding license header to all files (.c, .cpp, .h, .hpp):"
for i in $file_list
do
if grep -Fxq ${line_start_mark} $i; then
echo "skippping ${i}"
else
echo " - ${i}"
( echo ${line_start_mark}$'\n//'; cat ${license}; echo $'//\n'${line_end_mark}; cat $i ) > temp_file
mv temp_file $i
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment