update-copyright.sh 346 B

12345678910111213141516
  1. #!/bin/sh
  2. if [ "$SED" = "" ]; then
  3. if type gsed >/dev/null; then
  4. SED=gsed
  5. else
  6. SED=sed
  7. fi
  8. fi
  9. find . -type f \
  10. | grep -v \.git \
  11. | while read file; do \
  12. LC_ALL=C $SED -b -i "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$file"; \
  13. done