about summary refs log tree commit diff stats
path: root/templates/awk
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--templates/awk/.licensure.yml6
-rwxr-xr-xtemplates/awk/scripts/renew_copyright_header.sh8
2 files changed, 10 insertions, 4 deletions
diff --git a/templates/awk/.licensure.yml b/templates/awk/.licensure.yml
index b7f963a..80d8f71 100644
--- a/templates/awk/.licensure.yml
+++ b/templates/awk/.licensure.yml
@@ -21,10 +21,10 @@ licenses:
         email: "benedikt.peetz@b-peetz.de"
 
     template: |
-      <TODO> 2024 - [year] (C) by [name of author]
+      TODO 2024 - [year] (C) by [name of author]
       SPDX-License-Identifier: CC-BY-SA-4.0
 
-      <TODO> is licensed under a
+      TODO is licensed under a
       Creative Commons Attribution-ShareAlike 4.0 International License.
 
       You should have received a copy of the license along with this
@@ -68,7 +68,7 @@ licenses:
 
         This file is part of the TODO.
 
-        Trixy is free software: you can redistribute it and/or modify
+        TODO is free software: you can redistribute it and/or modify
         it under the terms of the Lesser GNU General Public License as
         published by the Free Software Foundation, either version 3 of
         the License, or (at your option) any later version.
diff --git a/templates/awk/scripts/renew_copyright_header.sh b/templates/awk/scripts/renew_copyright_header.sh
index edb0a65..4f424c3 100755
--- a/templates/awk/scripts/renew_copyright_header.sh
+++ b/templates/awk/scripts/renew_copyright_header.sh
@@ -3,6 +3,7 @@
 # NOTE: This is the line length of the .licensure.yml header template **plus** the extra
 # line after the template comment.
 TEMPLATE_LINE_LENGTH=20
+LATEX_TEMPLATE_LINE_LENGTH=9
 
 PROJECT_ROOT="$(git rev-parse --show-toplevel)"
 
@@ -17,6 +18,11 @@ remove() {
     "Makefile" | "toml" | "envrc" | "yml" | "gitignore" | "awk")
         sed --in-place "1,${TEMPLATE_LINE_LENGTH}d" "$file"
         ;;
+    # LaTeX files (or TeX files in general) have a different license, use the
+    # $LATEX_TEMPLATE_LINE_LENGTH variable.
+    "tex")
+        sed --in-place "1,${LATEX_TEMPLATE_LINE_LENGTH}d" "$file"
+        ;;
     # normal '/* ... */' like comments (these are $TEMPLATE_LINE_LENGTH + 2 lines long)
     "c" | "h" | "md" | "rs")
         length="$((TEMPLATE_LINE_LENGTH + 2))"
@@ -66,7 +72,7 @@ if [ -f "$1" ]; then
     fi
 else
     fd --type file --hidden . | while read -r file; do
-        if grep --quiet 'SPDX-License-Identifier: GPL-3.0-or-later' "$file"; then
+        if grep --quiet 'SPDX-License-Identifier' "$file"; then
             filename="$(basename -- "$file")"
             extension="${filename##*.}"
             filename="${filename%.*}"