From 895dad1e4265c17486f6bb0a59eed34f004fe82f Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Tue, 7 Jan 2020 20:31:54 +0200 Subject: [PATCH] [mod] #252: Create helper to update the copyright year --- update_copyright_year.sh | 7 +++++++ 1 file changed, 7 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..edf97d1f --- /dev/null +++ b/update_copyright_year.sh @@ -0,0 +1,7 @@ +#!/bin/fish + +# Script to update the copyright year in header files + +set NEW_YEAR (date +"%Y") +set OLD_YEAR (math $NEW_YEAR - 1) +sed -i "s/Copyright 2016-$OLD_YEAR M/Copyright 2016-$NEW_YEAR M/g" bin/silkaj silkaj/*.py tests/*.py -- GitLab