diff --git a/scripts/licenses.sh b/scripts/licenses.sh new file mode 100755 index 0000000000..91b312db8f --- /dev/null +++ b/scripts/licenses.sh @@ -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" \ No newline at end of file