blob: 27b3db937ea0e2ca68b3a644d3f39475994b9399 [file] [log] [blame]
njnbb372652006-06-01 13:44:07 +00001#! /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.
sewardj7a2505d2006-06-05 23:20:25 +000020for i in `find . -name '*.[chS]' -type f -not -path '*.svn\/*'` ; do
njnbb372652006-06-01 13:44:07 +000021 echo $i
sewardj7a2505d2006-06-05 23:20:25 +000022 sed "s/Copyright (C) 200\([0-9]\)-2005/Copyright (C) 200\1-2006/" < $i > tmp.$$
njnbb372652006-06-01 13:44:07 +000023 mv tmp.$$ $i
24done
25