diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-03-23 13:47:17 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-03-23 16:32:53 -0700 |
commit | 5a33bc49c9770be7246fc170ce5691d93353724b (patch) | |
tree | 10b4659aaec48aac4505b7a6191cddb8ad4be1b5 /bin/locmaint | |
parent | 66995798688c30b52e2fd2f89c039ecb9c29f77e (diff) | |
download | dotfiles-5a33bc49c9770be7246fc170ce5691d93353724b.tar.gz |
locmaint: style/readability
Diffstat (limited to 'bin/locmaint')
-rwxr-xr-x | bin/locmaint | 11 |
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; } } |