openmct/scripts/licenses.sh
Victor Woeltjen c4a5ec0c7b [Licenses] Add usage note
Add usage note to license header script, WTD-1051.
2015-05-13 12:46:37 -07:00

15 lines
327 B
Bash
Executable File

# Usage:
# ./scripts/licenses.sh <directory> <extension> <license>
# e.g.
# ./scripts/licenses.sh platform js scripts/license.js
#
# Note that this will ignore anything in a lib directory
LICENSE=`cat $3`
MATCHES=`find $1 -name "*.$2" | grep -v /lib/`
for i in $MATCHES
do
cat "$3" "$i" > "$i".new && mv "$i".new "$i"
done