From 147b493b30c162de7714dc940ce7ebac9be7498b Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 7 Feb 2002 21:09:32 +0000 Subject: adding update-ldetect-lst to take care of directorized pcitable/usbtable/... --- update-ldetect-lst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 update-ldetect-lst (limited to 'update-ldetect-lst') diff --git a/update-ldetect-lst b/update-ldetect-lst new file mode 100644 index 00000000..77c119c4 --- /dev/null +++ b/update-ldetect-lst @@ -0,0 +1,17 @@ +#!/usr/bin/perl + +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/$_"); + } +} -- cgit v1.2.1