Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] utils/scancpan: improve license file detection
@ 2019-09-16 19:04 Francois Perrad
  2019-09-17 20:51 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Francois Perrad @ 2019-09-16 19:04 UTC (permalink / raw)
  To: buildroot

MANIFEST may contains line like this:
"LICENSE                     LICENSE file (added by Distar)"
so, retains only the first word.

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
---
 utils/scancpan | 1 +
 1 file changed, 1 insertion(+)

diff --git a/utils/scancpan b/utils/scancpan
index 1fccc980a..484ccaca9 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.20.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-09-17 20:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-16 19:04 [Buildroot] [PATCH] utils/scancpan: improve license file detection Francois Perrad
2019-09-17 20:51 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox