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>
This commit is contained in:
parent
0471f650b1
commit
f71f944fe6
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user