diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-02-07 21:09:32 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-02-07 21:09:32 +0000 |
commit | 147b493b30c162de7714dc940ce7ebac9be7498b (patch) | |
tree | 96e1e89c8bcd08008ded7fe14666f2f34891c3ab /update-ldetect-lst | |
parent | 5a075baba358ea6f515652565cb48ab070c78721 (diff) | |
download | ldetect-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-lst | 17 |
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/$_"); + } +} |