forked from ghostchain/ghost-node
17 lines
325 B
Bash
Executable File
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"
|