2 kwords='copyright|warranty|redistribution|modification|patent|trademark|licen[cs]e|permission'
5 files=`{find $1 ! -path '*debian*' -type f}
8 notices=`{grep -H '(C)' $file}
9 notices=($notices `{grep -HEi $kwords $file})
10 lines=($lines `{{for (notice in $notices) echo $notice} | sort -u})
12 # let's hope no file has a : in it
13 ifs=() { seen_files=`{{for (line in $lines) echo $line} | cut -d: -f1} }
15 for (file in $files) {
16 if (echo -n $seen_files | grep -q '^'^$file^'$') {
18 missing_copyright=($missing_copyright $file)
21 echo 'Suspect copyright notices:'
22 for (line in $lines) echo ' '$line
23 echo 'Files without *suspect* copyright notices:'
24 for (missing in $missing_copyright) {
26 echo ' type: '`{file $missing}
27 echo ' chars: '`{wc -c $missing | awk '{print $1}'}
28 echo ' lines: '`{wc -l $missing | awk '{print $1}'}