Script from Sylvain to automate updating the copyright year
authorSam Lantinga <slouken@libsdl.org>
Tue, 26 May 2015 06:27:12 -0700
changeset 96185eec9af4374c
parent 9617 062bfde7330a
child 9619 b94b6d0bff0f
Script from Sylvain to automate updating the copyright year
build-scripts/update-copyright.sh
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/build-scripts/update-copyright.sh	Tue May 26 06:27:12 2015 -0700
     1.3 @@ -0,0 +1,9 @@
     1.4 +#!/bin/sh
     1.5 +
     1.6 +find . -type f -exec grep -Il "Copyright" {} \;     \
     1.7 +| grep -v \.hg                             \
     1.8 +| while read i;                            \
     1.9 +do \
    1.10 +  sed -ie "s/\(.*Copyright.*\)[0-9]\{4\}\( *Sam Lantinga\)/\1`date +%Y`\2/" "$i"; \
    1.11 +  rm "${i}e"; \
    1.12 +done