diff --git a/util/recent_changes.sh b/util/recent_changes.sh index 8462cc9b8c..729559557f 100644 --- a/util/recent_changes.sh +++ b/util/recent_changes.sh @@ -22,8 +22,10 @@ # current one is seen. Used by merge_copyrights. thisyear=`date +%Y` -git whatchanged --pretty="date %ai" --date=iso8601 | awk -vre="${thisyear}-" ' +git whatchanged --pretty="date %ai" --date=iso8601 | awk -v re="${thisyear}-" ' + BEGIN { change=0 } $1 == "date" && $2 !~ re { exit(0); } $1 == "date" { next; } NF == 0 { next; } - $(NF-1) ~ /[AM]/ { print "./" $NF }' | sort | uniq + $(NF-1) ~ /[AM]/ { print "./" $NF; change=1 } + END { if (change) print "./COPYRIGHT" } ' | sort | uniq