Script from Sylvain to automate updating the copyright year

Sam Lantinga 2015-05-26 06:27:12 -07:00
parent d88b6738f0
commit c133c8c8a5
1 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,9 @@
#!/bin/sh
find . -type f -exec grep -Il "Copyright" {} \; \
| grep -v \.hg \
| while read i; \
do \
sed -ie "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$i"; \
rm "${i}e"; \
done