openmct/scripts/licenses.sh
Victor Woeltjen 30013f2bf5 [Licenses] Add script for license headers
Add script to add license headers, WTD-1051.
2015-04-01 16:48:58 -07:00

12 lines
197 B
Bash
Executable File

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"