arm64 regtest: improve dc_cvax test
[valgrind.git] / auxprogs / change-copyright-year
blobeeeecd3ef14116ef982496a405fb73c86472d221
1 #! /bin/sh
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:
6 # "Copyright (C) 20xy-2017"
8 # where x can be 0 or 1 and y can be anything.
9 # To use:
10 # - change the years in the 'perl' command below appropriately.
11 # - Run it from the base directory of a Valgrind workspace.
12 # - And check the results look ok by diff'ing against the repository.
14 # Note that it will spit out some warnings when it runs; ignore these.
17 # The find command deliberately skips .git/ subdir -- we don't want to
18 # change it.
19 for i in `find . -name '*.[chS]' -o -name '*.in' -type f -not -path '*.git\/*'` ; do
20 echo $i
21 if [ -L $i ]; then continue; fi # skip symbolic links
22 perl -p -e 's/Copyright \(C\) 20([0-1])([0-9])-2015/Copyright (C) 20$1$2-2017/' < $i > tmp.$$
23 mv tmp.$$ $i
25 # Copyright IBM Corp. 2010-2011
27 perl -p -e 's/Copyright IBM Corp. 20([0-1])([0-9])-2015/Copyright IBM Corp. 20$1$2-2017/' < $i > tmp.$$
28 mv tmp.$$ $i
29 done