From 0d6c5bccb71fc30304c14d2d0fd5ef28cc76d21f 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..5b6f18a3 --- /dev/null +++ b/update_copyright_year.sh @@ -0,0 +1,8 @@ +#!/bin/fish + +# Script to update the copyright year in header files + +set NEW_YEAR (date +"%Y") +set OLD_YEAR (math $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