mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 05:36:32 +00:00
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;
|
my @license_files;
|
||||||
foreach (split /\n/, $manifest) {
|
foreach (split /\n/, $manifest) {
|
||||||
next if m|/|;
|
next if m|/|;
|
||||||
|
s|\s+.*$||;
|
||||||
push @license_files, $_ if m/(ARTISTIC|COPYING|COPYRIGHT|LICENSE)/i;
|
push @license_files, $_ if m/(ARTISTIC|COPYING|COPYRIGHT|LICENSE)/i;
|
||||||
}
|
}
|
||||||
if (scalar @license_files == 0 && $manifest =~ m/(README)[\n\s]/i) {
|
if (scalar @license_files == 0 && $manifest =~ m/(README)[\n\s]/i) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user