From e9c9ca7c702094c3b09bdc2d68b5c2dc3d9661ef Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 30 Oct 2023 07:13:15 +0100 Subject: [PATCH] assemble: use full path when searching for GLOBs as otherwise a GLOB like vendor/dev-class/* will cause all FW files to be included.. Signed-off-by: Thomas Lamprecht --- assemble-firmware.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/assemble-firmware.pl b/assemble-firmware.pl index d0e7667..7c2877b 100755 --- a/assemble-firmware.pl +++ b/assemble-firmware.pl @@ -537,13 +537,17 @@ sub add_fw :prototype($$) { my $module = basename($mod); my $name = basename($fw); + my $fw_dir = dirname($fw); if ($name =~ /\*/) { - my $sr = `find '$target' \\( -type f -o -type l \\) -name '$name'`; + die "cannot handle GLOBs in path stem ('$fw_dir'), switch find below to regex and transform GLOB to regex" + if $fw_dir =~ /\*/; + + my $sr = `find '$target/$fw_dir' \\( -type f -o -type l \\) -name '$name'`; chomp $sr; if ($sr) { for my $f (split("\n", $sr)) { - print "found $f for GLOB '$name'\n"; + print "found $f for GLOB '$fw'\n"; my $f_name = basename($f); $fwbase_name->{$f_name} = 1; }