]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Update, so as to be able to handle the 200x vs 201x change.
authorJulian Seward <jseward@acm.org>
Sun, 23 Oct 2011 07:31:08 +0000 (07:31 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 23 Oct 2011 07:31:08 +0000 (07:31 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12205

auxprogs/change-copyright-year

index 4901df4805f950b18b7c6fa9b23e53579c9170b4..a377f8c42d665a81460b5d0472358a8ac3839efe 100755 (executable)
@@ -3,23 +3,22 @@
 # Script updates the copyright year in every file in Valgrind that contains
 # a copyright notice.  Assumes they're all in the same format:
 #
-#     "Copyright (C) 200x-200y"
+#     "Copyright (C) 20xy-2010"
 #
+# where x can be 0 or 1 and y can be anything.
 # To use:
-# - change the years in the 'sed' command below appropriately.
+# - change the years in the 'perl' command below appropriately.
 # - Run it from the base directory of a Valgrind workspace.  
 # - And check the results look ok by diff'ing against the repository.
 #
 # Note that it will spit out some warnings when it runs;  ignore these.
 #
-# Nb: after 2009, the sed string may have to be changed slightly -- it
-# currently assumes the first year is in the range 2000..2009.
 
 # The find command deliberately skips .svn/ subdirs -- we don't want to
 # change them.
 for i in `find . -name '*.[chS]' -type f -not -path '*.svn\/*'` ; do
     echo $i
-    perl -p -e 's/Copyright \(C\) 200([0-9])-2009/Copyright (C) 200$1-2010/' < $i > tmp.$$
+    perl -p -e 's/Copyright \(C\) 20([0-1])([0-9])-2010/Copyright (C) 20$1$2-2011/' < $i > tmp.$$
     mv tmp.$$ $i
 done