reuse: Fix screen-scraping expression for version 2.x

reuse 2.1.0 outputs "files with ..." instead of "Files with ...",
but it's easy to accept both.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2024-02-07 12:37:29 +00:00
parent a040562d6c
commit 5d888bc7c2

View File

@ -26,9 +26,9 @@ files_without_license_information_max=559
# output rather than the current human-readable output.
lint_output="$(reuse lint || true)"
files_with_copyright_information="$(echo "${lint_output}" | awk '/^\* Files with copyright information: / { print $6 }')"
files_with_license_information="$(echo "${lint_output}" | awk '/^\* Files with license information: / { print $6 }')"
total_files="$(echo "${lint_output}" | awk '/^\* Files with copyright information: / { print $8 }')"
files_with_copyright_information="$(echo "${lint_output}" | awk '/^\* [fF]iles with copyright information: / { print $6 }')"
files_with_license_information="$(echo "${lint_output}" | awk '/^\* [fF]iles with license information: / { print $6 }')"
total_files="$(echo "${lint_output}" | awk '/^\* [fF]iles with copyright information: / { print $8 }')"
error=0
files_without_copyright_information="$(( total_files - files_with_copyright_information ))"