mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
small looping if/elsif optimization for deb822
This commit is contained in:
parent
380e8e956c
commit
05f2065bb8
12
inxi
12
inxi
|
@ -13159,26 +13159,26 @@ sub get_repos_linux {
|
||||||
$b_apt_enabled = 1;
|
$b_apt_enabled = 1;
|
||||||
}
|
}
|
||||||
#print "row:$row\n";
|
#print "row:$row\n";
|
||||||
if ($row =~ /^Types:\s*(.*)/){
|
elsif ($row =~ /^Types:\s*(.*)/){
|
||||||
#print "ath:$type_holder\n";
|
#print "ath:$type_holder\n";
|
||||||
$apt_types = $1;
|
$apt_types = $1;
|
||||||
}
|
}
|
||||||
if ($row =~ /^Enabled:\s*(.*)/){
|
elsif ($row =~ /^Enabled:\s*(.*)/){
|
||||||
my $status = $1;
|
my $status = $1;
|
||||||
$b_apt_enabled = ($status =~ /\b(disable|false|off|no|without)\b/i) ? 0: 1;
|
$b_apt_enabled = ($status =~ /\b(disable|false|off|no|without)\b/i) ? 0: 1;
|
||||||
}
|
}
|
||||||
if ($row =~ /^[^#]+:\//){
|
elsif ($row =~ /^[^#]+:\//){
|
||||||
my $url = $row;
|
my $url = $row;
|
||||||
$url =~ s/^URIs:\s*//;
|
$url =~ s/^URIs:\s*//;
|
||||||
push @apt_working, $url if $url;
|
push @apt_working, $url if $url;
|
||||||
}
|
}
|
||||||
if ($row =~ /^Suites:\s*(.*)/){
|
elsif ($row =~ /^Suites:\s*(.*)/){
|
||||||
$apt_suites = $1;
|
$apt_suites = $1;
|
||||||
}
|
}
|
||||||
if ($row =~ /^Components:\s*(.*)/){
|
elsif ($row =~ /^Components:\s*(.*)/){
|
||||||
$apt_comp = $1;
|
$apt_comp = $1;
|
||||||
}
|
}
|
||||||
if ($row =~ /^Architectures:\s*(.*)/){
|
elsif ($row =~ /^Architectures:\s*(.*)/){
|
||||||
$apt_arch = $1;
|
$apt_arch = $1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue