summaryrefslogtreecommitdiff
path: root/bin/locmaint
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2020-03-23 13:47:17 -0700
committerSean Whitton <spwhitton@spwhitton.name>2020-03-23 16:32:53 -0700
commit5a33bc49c9770be7246fc170ce5691d93353724b (patch)
tree10b4659aaec48aac4505b7a6191cddb8ad4be1b5 /bin/locmaint
parent66995798688c30b52e2fd2f89c039ecb9c29f77e (diff)
downloaddotfiles-5a33bc49c9770be7246fc170ce5691d93353724b.tar.gz
locmaint: style/readability
Diffstat (limited to 'bin/locmaint')
-rwxr-xr-xbin/locmaint11
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/locmaint b/bin/locmaint
index 98a1e2f4..d9f3ca42 100755
--- a/bin/locmaint
+++ b/bin/locmaint
@@ -574,11 +574,11 @@ sub do_sysmaint {
my $curr_pkg;
for (`dpkg-query --show --showformat='\${Package}\\n\${Conffiles}\\n'`) {
chomp;
- next unless /\S/;
+ /\S/ or next;
if (/^\S/) {
$curr_pkg = $_;
} else {
- my @fields = split ' ';
+ my @fields = split;
push @{$obsolete_conffiles{$curr_pkg}}, $fields[0]
if $fields[$#fields] eq "obsolete"
and not exists $known_bad_obsolete_conffiles{$fields[0]};
@@ -598,9 +598,10 @@ sub do_sysmaint {
. "its package -- but note that this is not the right fix if the conffile has\n"
. "moved between packages.\n\n";
if (prompt_yn "Attempt the fix?") {
- system as_root("rm @all_obsolete_conffiles");
- system as_root("apt-get install -y --reinstall "
- . join(' ', keys %obsolete_conffiles));
+ system as_root "rm @all_obsolete_conffiles";
+ system as_root join ' ',
+ "apt-get install -y --reinstall",
+ keys %obsolete_conffiles;
}
}