copyright.sh 397 B

12345678910111213
  1. #!/bin/sh
  2. # Updates copyright year in all text files in the tree, excluding 3rdpary and
  3. # other special folders.
  4. YEAR=$(date +"%Y")
  5. find . \
  6. -not -path './.git/*' \
  7. -not -path './3rdparty/*' \
  8. -not -path './build/*' \
  9. -type f \
  10. | tr '\n' '\0' \
  11. | xargs -0 -n1 sed -i "s/-[0-9]\{4\} Daniele Bartolini/-${YEAR} Daniele Bartolini/g"