瀏覽代碼

Script from Sylvain to automate updating the copyright year

Sam Lantinga 10 年之前
父節點
當前提交
c133c8c8a5
共有 1 個文件被更改,包括 9 次插入0 次删除
  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