summaryrefslogtreecommitdiffstats
path: root/update-ldetect-lst
blob: d09210177adb09f3684635c871f5ff66a2bb2bec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/perl

my $dir = '/usr/share/ldetect-lst';
my @files = qw(pcitable usbtable isatable pcmciatable);

unlink "$dir/$_" foreach @files;

$ARGV[0] eq '--clean' and exit 0;

foreach (@files) {
    my $d = "$dir/$_.d";
    -d $d or next;
    my @l = sort glob("$d/*.lst") or next;
    system("cat " . join(" ", @l) . " > $dir/$_");
}