From 2245d0734e0b7f5cbaf15ec2ef0eee03f2f20491 Mon Sep 17 00:00:00 2001 From: Per Cederqvist <ceder@lysator.liu.se> Date: Tue, 5 Apr 1994 07:49:23 +0000 Subject: [PATCH] First try. --- scripts/update-copyright | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 scripts/update-copyright diff --git a/scripts/update-copyright b/scripts/update-copyright new file mode 100755 index 000000000..9af0a2e74 --- /dev/null +++ b/scripts/update-copyright @@ -0,0 +1,35 @@ +#!/bin/bash +# $Id: update-copyright,v 1.1 1994/04/05 07:49:23 ceder Exp $ +# Copyright (C) 1994 Lysator Academic Computer Association. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# Please mail bug reports to bug-lyskom@lysator.liu.se. +set -e +while read file +do + grep 'Copyright' $file \ + | tr , '\012' \ + | sed -n 's/.*\([0-9][0-9][0-9][0-9]\).*/\1/p' > /tmp/$$.year + cvs log $file \ + | sed -n 's/^date: \([0-9][0-9][0-9][0-9]\).*author.*state.*$/\1/p' \ + | sort | uniq >> /tmp/$$.year + y=`sort /tmp/$$.year | uniq \ + | (read first ; echo -n $first; \ + while read second; do echo -n ", $second"; done)` + sed 's/\(Copyright[^0-9]*\)[0-9 ,]*[0-9]\([^0-9]*\)/\1'"$y"'\2/' \ + < $file > /tmp/$$.file + mv /tmp/$$.file $file +done -- GitLab