diff options
author | njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2006-06-01 13:44:07 +0000 |
---|---|---|
committer | njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2006-06-01 13:44:07 +0000 |
commit | bb3726515345b19ab72e877432cc1e75c9615869 (patch) | |
tree | 399ea477e8c0a98054569b3430dd11002138cffd /auxprogs | |
parent | f7e82ae3a7deeefecaaee06bd40dc37c474604f7 (diff) |
Added a useful script.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5948 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'auxprogs')
-rwxr-xr-x | auxprogs/change-copyright-year | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/auxprogs/change-copyright-year b/auxprogs/change-copyright-year new file mode 100755 index 00000000..9eb6e023 --- /dev/null +++ b/auxprogs/change-copyright-year @@ -0,0 +1,25 @@ +#! /bin/sh +# +# 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" +# +# To use: +# - change the years in the 'sed' 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 '*' -type f -not -path '*.svn\/*'` ; do + echo $i + sed "s/Copyright (C) 200\([0-9]\)-2004/Copyright (C) 200\1-2005/" < $i > tmp.$$ + mv tmp.$$ $i +done + |