Debian Codegraph @

autodock/update_copyright

raw
1 #! /bin/sh
2 # $Id: update_copyright,v 1.1 2009/05/29 21:01:58 rhuey Exp $
3 # modifies an existing copyright line by updating text
4 for i in "$@"
5 do
6 awk '/\(C\)/ {
7 if(index($0, "fprint")) { print; next}
8 startcom= substr($0,1,2)=="/*"
9 endcom= 0!=index($0, "*/")
10 endcomma= $0 ~ /, *$/
11
12 new= "Copyright (C) 2009 The Scripps Research Institute. All rights reserved."
13 if(substr($0,1,2)!=" C") new=substr($0,1,2) new
14 if(endcom) new=new " */"
15 #print FILENAME
16 #print $0
17 print new
18
19 if(endcomma) {
20 getline
21 if($0!~" *All Rights Reserved. *")print
22 }
23
24 next
25 }
26 { print }
27 ' $i > t && \cp t $i && \rm t
28 echo $i
29 done