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

[skip ci] minor changes in license script

parent ed3915b9
No related branches found
No related tags found
1 merge request!448Draft: Resolve "Implementation of new nodes creation"
Pipeline #20661 skipped
...@@ -15,6 +15,7 @@ exclude_folder="" ...@@ -15,6 +15,7 @@ exclude_folder=""
#license="" #license=""
config_folder="" config_folder=""
license_exclude="" license_exclude=""
exclude_mark="// This is not part of WOLF"
for i in "$@"; do for i in "$@"; do
case $i in case $i in
...@@ -122,10 +123,9 @@ fi ...@@ -122,10 +123,9 @@ fi
sed -i -e '/./,$!d' -e :a -e '/^\n*$/{$d;N;ba' -e '}' $license #remove empty lines at the beginning and at the end sed -i -e '/./,$!d' -e :a -e '/^\n*$/{$d;N;ba' -e '}' $license #remove empty lines at the beginning and at the end
line_start_mark=$(head -n 1 $license) line_start_mark=$(head -n 1 $license)
line_end_mark=$(tail -n 1 $license) line_end_mark=$(tail -n 1 $license)
exclude_mark="// This is not part of WOLF"
echo "line_start: $line_start_mark" echo "line_start: $line_start_mark"
echo "line_end: $line_end_mark" echo "line_end: $line_end_mark"
echo "excluding files starting with: $exlude_mark" echo "excluding files starting with: $exclude_mark"
# PATH (AND tmp FOLDER) # PATH (AND tmp FOLDER)
folder=$path folder=$path
...@@ -171,7 +171,7 @@ if [ "$mode" == "add" ]; then ...@@ -171,7 +171,7 @@ if [ "$mode" == "add" ]; then
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 for i in $file_list
do do
if grep -m1 -Fxq "${exlude_mark}" $i; then if grep -m1 -Fxq "${exclude_mark}" $i; then
echo "excluding ${i} since it contains exclude mark" echo "excluding ${i} since it contains exclude mark"
else else
if grep -m1 -Fxq "${line_start_mark}" $i; then if grep -m1 -Fxq "${line_start_mark}" $i; then
......
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