1ca2cf024391992fe14b2df7d3ae0f575d074452Evan Hunt# Copyright (C) 2012, 2016, 2017 Internet Systems Consortium, Inc. ("ISC")
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# This Source Code Form is subject to the terms of the Mozilla Public
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# License, v. 2.0. If a copy of the MPL was not distributed with this
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# file, You can obtain one at http://mozilla.org/MPL/2.0/.
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt# Find the list of files that have been touched in the Git repository
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt# during the current calendar year. This is done by walking backwards
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt# through the output of "git whatchanged" until a year other than the
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt# current one is seen. Used by merge_copyrights.
8d59536d7c24e137f2bb1796b962bbafd8cac701Evan Huntgit whatchanged --since="$when" --pretty="" | awk '
87a40683bf81a4a18291c093b7da67ca46760607Mark Andrews BEGIN { change=0 }
af9dbf1ccdd53933aaae9300d13ce0965d39b067Evan Hunt NF == 0 { next; }
87a40683bf81a4a18291c093b7da67ca46760607Mark Andrews $(NF-1) ~ /[AM]/ { print "./" $NF; change=1 }
87a40683bf81a4a18291c093b7da67ca46760607Mark Andrews END { if (change) print "./COPYRIGHT" } ' | sort | uniq