diff options
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/$_"); + } +} |