From f65eff34509ece787ddb6b32c2c601fe746ce3a1 Mon Sep 17 00:00:00 2001
From: Moul <moul@moul.re>
Date: Mon, 21 Sep 2020 21:28:53 +0200
Subject: [PATCH] [doc] #111: Add script to update the copyright year

---
 update_copyright_year.sh | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100755 update_copyright_year.sh

diff --git a/update_copyright_year.sh b/update_copyright_year.sh
new file mode 100755
index 00000000..2e65b9f5
--- /dev/null
+++ b/update_copyright_year.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+# Script to update the copyright year in header files
+
+NEW_YEAR=`date +"%Y"`
+OLD_YEAR=`expr $NEW_YEAR - 1`
+find duniterpy tests examples -type f -name "*.py" | \
+xargs sed -i "s/Copyright  2014-$OLD_YEAR V/Copyright  2014-$NEW_YEAR V/g"
-- 
GitLab