yait

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 387085269ddcbeca8b316c82b703d8de0c4934ba
parent d46e1d7f37bae1954911d8659e048c646a07cd08
Author: vx-clutch <[email protected]>
Date:   Sat, 23 Aug 2025 08:04:11 -0400

pre bulk changes

Diffstat:
Msrc/main.c | 2+-
Atools/add-copyright-header | 32++++++++++++++++++++++++++++++++
Atools/check-copyright-headers | 4++++
3 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/src/main.c b/src/main.c @@ -1,4 +1,4 @@ -/* Copyright (C) vx_clutch +/* Copyright (C) vx-clutch * * This file is part of yait * diff --git a/tools/add-copyright-header b/tools/add-copyright-header @@ -0,0 +1,32 @@ +#!/bin/sh + +HEADER=$(cat <<EOF +/* Copyright (C) vx-clutch + * + * This file is part of yait + * + * This project and file is licenced under the BSD-3-Clause licence. + * <https://opensource.org/licence/bsd-3-clause> + */ +EOF +) + +len=${#} + +i=0 +for file in "$@" +do + +i=$((i + 1)) +printf 'Adding header [%d/%d] %s\n' $i $len $file + +if grep -qF "$HEADER" "$file"; then + continue +fi + +tmp=$(mktemp) +printf '%s\n\n' "$HEADER" > "$tmp" +cat $file >> "$tmp" +mv "$tmp" $file + +done diff --git a/tools/check-copyright-headers b/tools/check-copyright-headers @@ -0,0 +1,4 @@ +#!/bin/sh + +find . -name "*.c" -exec add-copyright-header {} \; +find . -name "*.h" -exec add-copyright-header {} \;