From bb6150e44edd4a1407c42949533e97c6316807df Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sun, 19 Feb 2023 13:37:51 +0100 Subject: [PATCH] Use correct Kotlin file extension in update_copyright_headers.sh --- update_copyright_headers.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update_copyright_headers.sh b/update_copyright_headers.sh index 5ceb5ac73c..4cb8b08922 100755 --- a/update_copyright_headers.sh +++ b/update_copyright_headers.sh @@ -11,11 +11,11 @@ current_year=$(date +'%Y') echo Updating copyright headers in Java, Kotlin, and Groovy source code for year $current_year # Added/Modified this year and committed -for file in $(git --no-pager diff --name-only --diff-filter=AM @{$current_year-01-01}..@{$current_year-12-31} | egrep "^.+\.(java|kotlin|groovy)$" | uniq); do +for file in $(git --no-pager diff --name-only --diff-filter=AM @{$current_year-01-01}..@{$current_year-12-31} | egrep "^.+\.(java|kt|groovy)$" | uniq); do sed -i '' -E "s/Copyright 2002-[0-9]{4}/Copyright 2002-$current_year/g" $file; done # Added/Modified and staged but not yet committed -for file in $(git --no-pager diff --name-only --diff-filter=AM --cached | egrep "^.+\.(java|kotlin|groovy)$" | uniq); do +for file in $(git --no-pager diff --name-only --diff-filter=AM --cached | egrep "^.+\.(java|kt|groovy)$" | uniq); do sed -i '' -E "s/Copyright 2002-[0-9]{4}/Copyright 2002-$current_year/g" $file; done