You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

updateCopyrightYear.sh 349B

1234567891011121314151617
  1. #!/bin/bash
  2. . `dirname $0`/sed.sh
  3. rootdir=`dirname $0`/..
  4. year=$(date +%Y)
  5. old=$(grep Copyright checkstyle/header|sed "s/^ . //")
  6. new=$(echo $old|sed "s/2000-[^ ]* /2000-$year /")
  7. echo "Changing '$old' to '$new'"
  8. $SED -i "s/$old/$new/" checkstyle/header
  9. for javaFile in `find $rootdir -name "*.java"`
  10. do
  11. $SED -i "s/$old/$new/" $javaFile
  12. done