From: Timo Heister Date: Sun, 7 Feb 2016 00:21:36 +0000 (-0500) Subject: update update_copyright script X-Git-Tag: v8.4.0-rc2~27^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c318e76ffc6fa40c4afe67c3d620aac6fa1afe9;p=dealii.git update update_copyright script -i is only valid if you process a file --- diff --git a/contrib/utilities/update-copyright b/contrib/utilities/update-copyright index 4bd42c34c0..a758599374 100755 --- a/contrib/utilities/update-copyright +++ b/contrib/utilities/update-copyright @@ -49,13 +49,13 @@ for i in $files ; do last_year=`git log -n 3 --date=short --format="format:%cd %s" $i | \ egrep -i -v "update.*copyright|copyright.*update" | \ head -n 1 | \ - perl -pi -e 's/^(\d\d\d\d)-.*/\1/g;'` + perl -p -e 's/^(\d\d\d\d)-.*/\1/g;'` # get the first year this file was modified from the actual # file. this may predate the git log if the file was copied # from elsewhere first_year=`cat $i | egrep 'Copyright \(C\) [0-9]{4}' | \ - perl -pi -e "s/.*Copyright \(C\) (\d{4}).*/\1/g;"` + perl -p -e "s/.*Copyright \(C\) (\d{4}).*/\1/g;"` # print a status message. we really only have to update # the copyright year if the first and last year are