Skip to content
Snippets Groups Projects
Commit b566cc74 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

update headers to current year

This will decrease the number of pull requests from PlumedBot.

Currently, everytime a file is updated and someone forgets to run
headers.sh, the headers are outdated. With this change, this will happen
once per year. PlumedBot will thus mostly fix erroneous copyrights
(rarely happening).
parent 96a2bea2
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,10 @@ then
else
years=$(git log --follow -M75% --format=%aD $file |
sort -r -n -k 4 |
awk '{if(NR==1)last=$4;}END{
awk -v now="$(date +%Y)" '{if(NR==1)last=$4;}END{
# override last with now
last=now
# Notice that the script could be simplified, I leave it as is for reference:
first=$4
if(first=="") print ""
else if(first==last) print first;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment