From f71f944fe61b3671d1e72b3f6aaae5b238446eaa Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Mon, 16 Sep 2019 21:04:34 +0200 Subject: [PATCH] utils/scancpan: improve license file detection MANIFEST may contains line like this: "LICENSE LICENSE file (added by Distar)" so, retains only the first word. Signed-off-by: Francois Perrad Signed-off-by: Thomas Petazzoni --- utils/scancpan | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/scancpan b/utils/scancpan index 1fccc980af..484ccaca95 100755 --- a/utils/scancpan +++ b/utils/scancpan @@ -566,6 +566,7 @@ sub find_license_files { my @license_files; foreach (split /\n/, $manifest) { next if m|/|; + s|\s+.*$||; push @license_files, $_ if m/(ARTISTIC|COPYING|COPYRIGHT|LICENSE)/i; } if (scalar @license_files == 0 && $manifest =~ m/(README)[\n\s]/i) { -- 2.30.2