This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Copyright dates updated


On Thu, Mar 03, 2005 at 11:05:03PM +1030, Alan Modra wrote:
> So there were rather more updates than I expected.  I used this script
> to pull the info out of cvs:

As someone pointer out to me privately, I somehow managed to trim the
last "done" from the script when posting.  Since the idea of posting was
was to make it easy for other people to do similar tricks, here it is
again.

for z in `find . -name CVS -prune -o -type f \! -name \*~ \! -name .\#\* \! -name ChangeLog\* -print`
do
  echo $z; cvs log $z | sed -n -e '/^revision [^\.]*\.[^\.]*$/ {
n
s,date: \([^/]*\).*,\1,
h
n
/^branches:/ n
/copyright/ b
/Initial revision/ b
/^[Mm]erge / b
g
p
}' | uniq
done > /tmp/z

> Then I ran the following (or variations thereof to cope with generated
> files, BSD copyright etc.) to find me the files that needed editing.
> 
> while read x; do if test ${x%%/*} = .; then f=$x; else grep -q $x $f || echo $f; fi; done < /tmp/z | uniq | xargs grep -l Copyright

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]