njn | bb37265 | 2006-06-01 13:44:07 +0000 | [diff] [blame^] | 1 | #! /bin/sh |
| 2 | # |
| 3 | # Script updates the copyright year in every file in Valgrind that contains |
| 4 | # a copyright notice. Assumes they're all in the same format: |
| 5 | # |
| 6 | # "Copyright (C) 200x-200y" |
| 7 | # |
| 8 | # To use: |
| 9 | # - change the years in the 'sed' command below appropriately. |
| 10 | # - Run it from the base directory of a Valgrind workspace. |
| 11 | # - And check the results look ok by diff'ing against the repository. |
| 12 | # |
| 13 | # Note that it will spit out some warnings when it runs; ignore these. |
| 14 | # |
| 15 | # Nb: after 2009, the sed string may have to be changed slightly -- it |
| 16 | # currently assumes the first year is in the range 2000..2009. |
| 17 | |
| 18 | # The find command deliberately skips .svn/ subdirs -- we don't want to |
| 19 | # change them. |
| 20 | for i in `find . -name '*' -type f -not -path '*.svn\/*'` ; do |
| 21 | echo $i |
| 22 | sed "s/Copyright (C) 200\([0-9]\)-2004/Copyright (C) 200\1-2005/" < $i > tmp.$$ |
| 23 | mv tmp.$$ $i |
| 24 | done |
| 25 | |