From 05f2065bb818a7483ae016e195bf27ce45208bab Mon Sep 17 00:00:00 2001 From: Harald Hope Date: Fri, 28 Sep 2018 18:38:30 -0700 Subject: [PATCH] small looping if/elsif optimization for deb822 --- inxi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/inxi b/inxi index ddab498..7f0f600 100755 --- a/inxi +++ b/inxi @@ -13159,26 +13159,26 @@ sub get_repos_linux { $b_apt_enabled = 1; } #print "row:$row\n"; - if ($row =~ /^Types:\s*(.*)/){ + elsif ($row =~ /^Types:\s*(.*)/){ #print "ath:$type_holder\n"; $apt_types = $1; } - if ($row =~ /^Enabled:\s*(.*)/){ + elsif ($row =~ /^Enabled:\s*(.*)/){ my $status = $1; $b_apt_enabled = ($status =~ /\b(disable|false|off|no|without)\b/i) ? 0: 1; } - if ($row =~ /^[^#]+:\//){ + elsif ($row =~ /^[^#]+:\//){ my $url = $row; $url =~ s/^URIs:\s*//; push @apt_working, $url if $url; } - if ($row =~ /^Suites:\s*(.*)/){ + elsif ($row =~ /^Suites:\s*(.*)/){ $apt_suites = $1; } - if ($row =~ /^Components:\s*(.*)/){ + elsif ($row =~ /^Components:\s*(.*)/){ $apt_comp = $1; } - if ($row =~ /^Architectures:\s*(.*)/){ + elsif ($row =~ /^Architectures:\s*(.*)/){ $apt_arch = $1; } }