update-copyright.sh 545 B

12345678910111213141516
  1. #!/bin/sh
  2. find . -type f -exec grep -Il "Copyright" {} \; \
  3. | grep -v \.hg \
  4. | while read file; \
  5. do \
  6. LC_ALL=C sed -ie "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$file"; \
  7. rm "${file}e"; \
  8. done
  9. for file in COPYING.txt VisualC-WinRT/SDL2-WinRT.nuspec VisualC-WinRT/SDL2main-WinRT-NonXAML.nuspec src/main/windows/version.rc visualtest/COPYING.txt
  10. do if [ -f "$file" ]; then
  11. sed 's/$'"/`echo \\\r`/" $file > $file.new
  12. mv $file.new $file
  13. fi
  14. done