diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/updateCopyrightYear.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/updateCopyrightYear.sh b/scripts/updateCopyrightYear.sh new file mode 100755 index 0000000000..fee4d6aae8 --- /dev/null +++ b/scripts/updateCopyrightYear.sh @@ -0,0 +1,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 |