Script from Sylvain to automate updating the copyright year
authorSam Lantinga <slouken@libsdl.org>
Tue, 26 May 2015 06:27:12 -0700
changeset 9618 5eec9af4374c
parent 9617 062bfde7330a
child 9619 b94b6d0bff0f
Script from Sylvain to automate updating the copyright year
build-scripts/update-copyright.sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/build-scripts/update-copyright.sh	Tue May 26 06:27:12 2015 -0700
@@ -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