From 7c318e76ffc6fa40c4afe67c3d620aac6fa1afe9 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Sat, 6 Feb 2016 19:21:36 -0500 Subject: [PATCH] update update_copyright script -i is only valid if you process a file --- contrib/utilities/update-copyright | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5