From a779fa250df98b36652fb7259d2de95320b62659 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 4 May 2024 21:00:15 +0200 Subject: [PATCH] fix(scripts/renew_copyright_header): Update to the new copyright text --- flake.nix | 2 ++ scripts/renew_copyright_header.sh | 9 ++++----- 2 files changed, 6 insertions(+), 5 deletions(-) mode change 100644 => 100755 scripts/renew_copyright_header.sh diff --git a/flake.nix b/flake.nix index b435c85..23c5c2b 100644 --- a/flake.nix +++ b/flake.nix @@ -158,6 +158,8 @@ packages = with pkgs; [ cocogitto + yq + rust_default cargo-edit diff --git a/scripts/renew_copyright_header.sh b/scripts/renew_copyright_header.sh old mode 100644 new mode 100755 index d7b0c8f..3234906 --- a/scripts/renew_copyright_header.sh +++ b/scripts/renew_copyright_header.sh @@ -1,3 +1,4 @@ +#! /usr/bin/env sh # Copyright (C) 2024 - 2024: # The Trinitrix Project # SPDX-License-Identifier: MIT @@ -24,11 +25,9 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. -#! /usr/bin/env sh - # NOTE: This is the line length of the .licensure.yml header template **plus** the extra # line after the template comment. -TEMPLATE_LINE_LENGTH=20 +TEMPLATE_LINE_LENGTH=26 LATEX_TEMPLATE_LINE_LENGTH=9 PROJECT_ROOT="$(git rev-parse --show-toplevel)" @@ -41,7 +40,7 @@ remove() { # formatters do weird things to the file case "$extension" in # normal '#' comments (these are $TEMPLATE_LINE_LENGTH lines long) - "Makefile" | "toml" | "envrc" | "yml" | "gitignore" | "awk" | "lua") + "Makefile" | "makefile" | "toml" | "envrc" | "yml" | "gitignore" | "awk" | "lua") sed --in-place "1,${TEMPLATE_LINE_LENGTH}d" "$file" ;; # LaTeX files (or TeX files in general) have a different license, use the @@ -50,7 +49,7 @@ remove() { 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" | "html" | "svg" | "drawio") + "c" | "h" | "md" | "rs" | "html" | "svg" | "drawio" | "tri") length="$((TEMPLATE_LINE_LENGTH + 2))" sed --in-place "1,${length}d;" "$file" ;;