fix(scripts/renew_copyright_header): Add support for gitignore files

This commit is contained in:
Benedikt Peetz 2024-03-26 20:08:12 +01:00
parent 4110f659c6
commit 9e7e9d7b12
Signed by: bpeetz
GPG Key ID: A5E94010C3A642AD
1 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@
# and the Lesser GNU General Public License along with this program. # and the Lesser GNU General Public License along with this program.
# If not, see <https://www.gnu.org/licenses/>. # If not, see <https://www.gnu.org/licenses/>.
TEMPLATE_LINE_LENGHT=20 TEMPLATE_LINE_LENGHT=21
remove() { remove() {
extension="$1" extension="$1"
file="$2" file="$2"
@ -31,7 +31,7 @@ remove() {
# normal '#' comments (these are 19 lines long) # normal '#' comments (these are 19 lines long)
# the `config` file is the cargo config at `./example/main/.cargo/config`, which is # the `config` file is the cargo config at `./example/main/.cargo/config`, which is
# toml # toml
"Makefile" | "toml" | "envrc" | "config" | "yml") "Makefile" | "toml" | "envrc" | "config" | "yml" | "gitignore")
sed --in-place "1,${TEMPLATE_LINE_LENGHT}d" "$file" sed --in-place "1,${TEMPLATE_LINE_LENGHT}d" "$file"
;; ;;
# normal '/* ... */' like comments (these are 21 lines long--'#' + 2) # normal '/* ... */' like comments (these are 21 lines long--'#' + 2)