pre bulk changes

This commit is contained in:
2025-08-23 08:04:11 -04:00
parent d46e1d7f37
commit 387085269d
3 changed files with 37 additions and 1 deletions

32
tools/add-copyright-header Executable file
View File

@@ -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