[Licenses] Add script for license headers

Add script to add license headers, WTD-1051.
This commit is contained in:
Victor Woeltjen 2015-04-01 16:48:58 -07:00
parent af4d4a757b
commit 30013f2bf5

12
scripts/licenses.sh Executable file
View File

@ -0,0 +1,12 @@
LICENSE=`cat $3`
MATCHES=`find $1 -name "*.$2" | grep -v /lib/`
for i in $MATCHES
do
if ! grep -q "$LICENSE" $i
then
cat "$3" "$i" > "$i".new && mv "$i".new "$i"
fi
done
echo "$LICENSE"