Quellcode durchsuchen

Script from Sylvain to automate updating the copyright year

Sam Lantinga vor 10 Jahren
Ursprung
Commit
c133c8c8a5
1 geänderte Dateien mit 9 neuen und 0 gelöschten Zeilen
  1. 9 0
      build-scripts/update-copyright.sh

+ 9 - 0
build-scripts/update-copyright.sh

@@ -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