From 335136be147a6a72bfe52eed8fe9909dc72c6974 Mon Sep 17 00:00:00 2001 From: iliajie Date: Mon, 16 Jan 2023 00:22:22 +0200 Subject: [PATCH] Fix the loop bug when sourcing other configs ; remove stderr print --- net/debian-linux-lib.pl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/debian-linux-lib.pl b/net/debian-linux-lib.pl index f19630057..a0f47a434 100755 --- a/net/debian-linux-lib.pl +++ b/net/debian-linux-lib.pl @@ -800,7 +800,6 @@ open($fh, $file) || return (); my $line = <$fh>; my $lnum = 0; while (defined $line) { - print STDERR "file=$file line=$line\n"; chomp($line); # skip comments if ($line =~ /^\s*#/ || $line =~ /^\s*$/) { @@ -828,14 +827,13 @@ while (defined $line) { next; } } - elsif ($line =~ /^\s*source\s+(\S+)/) { + elsif ($line =~ /^\s*(source|source-directory)\s+(\S+)/) { # Expand includes $line = <$fh>; $lnum++; - my $src = $1; + my $src = $2; my @srcs = glob($src); foreach $src (@srcs) { - print STDERR "including $src\n"; my @inc = &get_interface_defs($src); push(@ret, @inc); }