Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 18 lines (15 sloc) 648 Bytes
cd `dirname $0`
for each in `find . -name "*.java" -o -name "*.c" -o -name "*.h" -o -name "*.kt" -o -name "README"`; do
# Need to determine if any license text exists before we try to change it
SEPARATOR=" ---------------------------------------------------------------------"
EXISTS=`grep -- "$SEPARATOR" $each`
if [ "$EXISTS" = "" ]; then
# No license exists, just add it to the top, along with an extra blank line
(cat COPYRIGHT; echo; cat $each) > $each.temp
# License text exists, use sed to remove it
(cat COPYRIGHT; cat $each | sed "1,/$SEPARATOR/d") > $each.temp
mv $each.temp $each
You can’t perform that action at this time.