File: addlicense.sh

package info (click to toggle)
biojava6-live 6.1.0%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 109,224 kB
  • sloc: java: 245,617; xml: 27,410; python: 64; makefile: 39; sh: 31
file content (14 lines) | stat: -rwxr-xr-x 382 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
# Adds the BioJava LGPL license statement to the top of every java file

BASEDIR=$(dirname "$0")

find . -iname '*.java' -exec grep -L 'http://www.gnu.org/copyleft/lesser.html' '{}' '+'|
xargs grep -Li 'copyright' |
while read file; do
    echo "$file"
    cat $BASEDIR/HEADER.txt > tmp.java
    echo >> tmp.java
    cat "$file" >> tmp.java
    mv tmp.java "$file"
done