This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Copyright dates updated
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Fri, 4 Mar 2005 08:39:58 +1030
- Subject: Re: Copyright dates updated
- References: <20050303123503.GD376@bubble.modra.org>
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