summaryrefslogtreecommitdiffstats
path: root/scripts/updateCopyrightYear.sh
blob: fee4d6aae841389ca6665b240a6f418dfcdfb2cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

. `dirname $0`/sed.sh

rootdir=`dirname $0`/..
year=$(date +%Y)
old=$(grep Copyright checkstyle/header|sed "s/^ . //")
new=$(echo $old|sed "s/2000-[^ ]* /2000-$year /")

echo "Changing '$old' to '$new'"

$SED -i "s/$old/$new/" checkstyle/header

for javaFile in `find $rootdir -name "*.java"`
do
	$SED -i "s/$old/$new/" $javaFile	
done