- ### 2. copy file body
- if grep -q 'Copyright.*SimGrid' "$file"; then
- sed '/Copyright.*SimGrid/,$d' "$file" > "$tmp_head"
- sed -i '${\!^/\* *$!d}' "$tmp_head"
- sed '1,/the terms of the license/d' "$file" > "$tmp_foot"
- elif [ $script = 1 ]; then
- head -n 1 "$file" > "$tmp_head"
- tail -n +2 "$file" > "$tmp_foot"
- printf '\n' >> "$tmp_head"
- else
- :> "$tmp_head"
- cp "$file" "$tmp_foot"
- fi
- sed -i '1{\!^ *\*/!d};/[^[:space:]]/,$!d' "$tmp_foot"
+ ### 2. copy file body
+ if grep -q 'Copyright.*SimGrid' "$file"; then
+ sed '/Copyright.*SimGrid/,$d' "$file" > "$tmp_head"
+ sed -i '${\!^/\* *$!d}' "$tmp_head"
+ sed '1,/the terms of the license/d' "$file" > "$tmp_foot"
+ elif [ $script = 1 ]; then
+ head -n 1 "$file" > "$tmp_head"
+ tail -n +2 "$file" > "$tmp_foot"
+ printf '\n' >> "$tmp_head"
+ else
+ :> "$tmp_head"
+ cp "$file" "$tmp_foot"
+ fi
+ sed -i '1{\!^ *\*/!d};/[^[:space:]]/,$!d' "$tmp_foot"