summaryrefslogtreecommitdiffstats
path: root/update-ldetect-lst
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-02-07 22:28:04 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-02-07 22:28:04 +0000
commit75ead674d734da8150b01c20f6b02fc04775a84f (patch)
tree21e5ecfb670dd77b45b0404dffd1946d0b3e2663 /update-ldetect-lst
parent147b493b30c162de7714dc940ce7ebac9be7498b (diff)
downloadldetect-lst-75ead674d734da8150b01c20f6b02fc04775a84f.tar
ldetect-lst-75ead674d734da8150b01c20f6b02fc04775a84f.tar.gz
ldetect-lst-75ead674d734da8150b01c20f6b02fc04775a84f.tar.bz2
ldetect-lst-75ead674d734da8150b01c20f6b02fc04775a84f.tar.xz
ldetect-lst-75ead674d734da8150b01c20f6b02fc04775a84f.zip
upgrading the package should now work... using trigger :-(
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/$_");
}