]> https://gitweb.dealii.org/ - dealii.git/commitdiff
update update_copyright script
authorTimo Heister <timo.heister@gmail.com>
Sun, 7 Feb 2016 00:21:36 +0000 (19:21 -0500)
committerTimo Heister <timo.heister@gmail.com>
Sun, 7 Feb 2016 01:12:17 +0000 (20:12 -0500)
-i is only valid if you process a file

contrib/utilities/update-copyright

index 4bd42c34c0462fc7edaad7f09e1d6fe2863045bb..a7585993745e874feb24aca9a44816c3b7efd67f 100755 (executable)
@@ -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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.