blob: 77c119c49e45e224502a7001737673cb2e7f2434 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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/$_");
}
}
|