summaryrefslogtreecommitdiffstats
path: root/update-ldetect-lst
diff options
context:
space:
mode:
Diffstat (limited to 'update-ldetect-lst')
-rw-r--r--update-ldetect-lst20
1 files changed, 9 insertions, 11 deletions
diff --git a/update-ldetect-lst b/update-ldetect-lst
index 77c119c4..d0921017 100644
--- a/update-ldetect-lst
+++ b/update-ldetect-lst
@@ -3,15 +3,13 @@
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/$_");
- }
+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/$_");
}