From: Francois Perrad Date: Mon, 16 Sep 2019 19:04:34 +0000 (+0200) Subject: utils/scancpan: improve license file detection X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f71f944fe61b3671d1e72b3f6aaae5b238446eaa;p=buildroot.git 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 --- 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) {