aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Francois Perrad <fperrad@gmail.com>2019-09-16 21:04:34 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-09-17 22:51:01 +0200
commitf71f944fe61b3671d1e72b3f6aaae5b238446eaa (patch)
treec14b8e131fe37abafe8f3c6585ea3928d3e2717f
parent0471f650b1eeb99276d1387dc50bf70b36460ce3 (diff)
downloadbuildroot-f71f944fe61b3671d1e72b3f6aaae5b238446eaa.tar.gz
buildroot-f71f944fe61b3671d1e72b3f6aaae5b238446eaa.tar.bz2
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 <francois.perrad@gadz.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-rwxr-xr-xutils/scancpan1
1 files changed, 1 insertions, 0 deletions
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) {