From 75ead674d734da8150b01c20f6b02fc04775a84f Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 7 Feb 2002 22:28:04 +0000 Subject: upgrading the package should now work... using trigger :-( --- update-ldetect-lst | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'update-ldetect-lst') diff --git a/update-ldetect-lst b/update-ldetect-lst index 77c119c4..d0921017 100644 --- a/update-ldetect-lst +++ b/update-ldetect-lst @@ -3,15 +3,13 @@ my $dir = '/usr/share/ldetect-lst'; my @files = qw(pcitable usbtable isatable pcmciatable); -if ($ARGV[0] eq '--clean') { - foreach (@files) { - unlink "$dir/$_"; - } -} else { - foreach (@files) { - my $d = "$dir/$_.d"; - -d $d or next; - my @l = sort glob("$d/*.lst") or next; - system("cat " . join(" ", @l) . " > $dir/$_"); - } +unlink "$dir/$_" foreach @files; + +$ARGV[0] eq '--clean' and exit 0; + +foreach (@files) { + my $d = "$dir/$_.d"; + -d $d or next; + my @l = sort glob("$d/*.lst") or next; + system("cat " . join(" ", @l) . " > $dir/$_"); } -- cgit v1.2.1