ghost-node/scripts/header-prefixer.sh
Uncle Stretch 66719626bb
inital commit, which is clearly not initial
Signed-off-by: Uncle Stretch <uncle.stretch@ghostchain.io>
2024-10-03 15:38:52 +03:00

17 lines
325 B
Bash
Executable File

#!/bin/sh
ROOT_PATH="${1:-}"
FILES=$(find ./"$ROOT_PATH" -type f -name '*.rs')
for f in $FILES; do
if (grep License $f); then
echo "[-] Already prefixed $f"
else
printf "\n" | cat file_header.txt - $f > $f.new
mv $f.new $f
echo "[+] License header copied to $f"
fi
done
echo "[+] All files have been processed"