summaryrefslogtreecommitdiffstats
path: root/update-ldetect-lst
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-02-07 21:09:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-02-07 21:09:32 +0000
commit147b493b30c162de7714dc940ce7ebac9be7498b (patch)
tree96e1e89c8bcd08008ded7fe14666f2f34891c3ab /update-ldetect-lst
parent5a075baba358ea6f515652565cb48ab070c78721 (diff)
downloadldetect-lst-147b493b30c162de7714dc940ce7ebac9be7498b.tar
ldetect-lst-147b493b30c162de7714dc940ce7ebac9be7498b.tar.gz
ldetect-lst-147b493b30c162de7714dc940ce7ebac9be7498b.tar.bz2
ldetect-lst-147b493b30c162de7714dc940ce7ebac9be7498b.tar.xz
ldetect-lst-147b493b30c162de7714dc940ce7ebac9be7498b.zip
adding update-ldetect-lst to take care of directorized pcitable/usbtable/...
Diffstat (limited to 'update-ldetect-lst')
-rw-r--r--update-ldetect-lst17
1 files changed, 17 insertions, 0 deletions
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/$_");
+ }
+}