mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
removed debian distro spin
This commit is contained in:
parent
ab6f94f51c
commit
415155f557
75
pinxi
75
pinxi
|
@ -50,8 +50,8 @@ use POSIX qw(ceil uname strftime ttyname);
|
|||
## INXI INFO ##
|
||||
my $self_name='pinxi';
|
||||
my $self_version='3.3.31';
|
||||
my $self_date='2023-11-06';
|
||||
my $self_patch='07';
|
||||
my $self_date='2023-11-07';
|
||||
my $self_patch='08';
|
||||
## END INXI INFO ##
|
||||
|
||||
my ($b_pledge,@pledges);
|
||||
|
@ -31168,8 +31168,8 @@ sub get_linux_distro {
|
|||
elsif (-d '/etc/salixtools/' && $distro =~ /Slackware/i){
|
||||
$distro =~ s/Slackware/Salix/;
|
||||
}
|
||||
# check for spins
|
||||
elsif ($distro =~ /^(Debian|Ubuntu)/i){
|
||||
# check for spins, relies on xdg directory name
|
||||
elsif ($distro =~ /^(Ubuntu)/i){
|
||||
my $base = $1;
|
||||
my $temp = distro_spin($distro);
|
||||
if ($temp ne $distro){
|
||||
|
@ -31521,6 +31521,41 @@ sub get_os_release {
|
|||
return $distro_osr;
|
||||
}
|
||||
|
||||
# args: 0: distro string
|
||||
# note: relies on /etc/xdg/xdg-[distro-id] which is an ubuntu thing but could
|
||||
# work if other distros use that for spins. Xebian does but not official spin.
|
||||
sub distro_spin {
|
||||
my $name = $_[0];
|
||||
eval $start if $b_log;
|
||||
my @spins = (
|
||||
['budgie','budgie','Ubuntu Budgie','Ubuntu'],
|
||||
['cinnamon','cinnamon','Ubuntu Cinnamon','Ubuntu'],
|
||||
['edubuntu','edubuntu','Edubuntu','Ubuntu'],
|
||||
# ['icebox','icebox','Debian Icebox','Debian'],
|
||||
['kubuntu','plasma','Kubuntu','Ubuntu'],
|
||||
['kylin','kylin','Ubuntu Kylin','Ubuntu'],
|
||||
['lubuntu','lubuntu','Lubuntu','Ubuntu'],
|
||||
['mate','mate','Ubuntu MATE','Ubuntu'],
|
||||
['studio','studio','Ubuntu Studio','Ubuntu'],
|
||||
# ['xebian','xebian','Xebian','Debian'],
|
||||
['xubuntu','xubuntu','Xubuntu','Ubuntu'],
|
||||
);
|
||||
my $tests = 'budgie,cinna,edub,plasma,kylin,lubu,mate,studio,xebi,xubu';
|
||||
$tests = join(':',
|
||||
main::globber("/etc/xdg/xdg-*{$tests}*"));
|
||||
# xdg is poor since only works in gui
|
||||
foreach my $spin (@spins){
|
||||
if ($name !~ /$spin->[0]/i && (
|
||||
($ENV{'XDG_CONFIG_DIRS'} && $ENV{'XDG_CONFIG_DIRS'} =~ /$spin->[1]/i) ||
|
||||
($tests && $tests =~ /$spin->[1]/i))){
|
||||
$name =~ s/\b$spin->[3]/$spin->[2]/i;
|
||||
last;
|
||||
}
|
||||
}
|
||||
eval $end if $b_log;
|
||||
return $name;
|
||||
}
|
||||
|
||||
# args: 0: optional: debian codename
|
||||
sub debian_id {
|
||||
eval $start if $b_log;
|
||||
|
@ -31612,38 +31647,6 @@ sub ubuntu_id {
|
|||
eval $end if $b_log;
|
||||
return $id;
|
||||
}
|
||||
|
||||
sub distro_spin {
|
||||
my $name = $_[0];
|
||||
eval $start if $b_log;
|
||||
my @spins = (
|
||||
['budgie','budgie','Ubuntu Budgie','Ubuntu'],
|
||||
['cinnamon','cinnamon','Ubuntu Cinnamon','Ubuntu'],
|
||||
['edubuntu','edubuntu','Edubuntu','Ubuntu'],
|
||||
['icebox','icebox','Debian Icebox','Debian'],
|
||||
['kubuntu','plasma','Kubuntu','Ubuntu'],
|
||||
['kylin','kylin','Ubuntu Kylin','Ubuntu'],
|
||||
['lubuntu','lubuntu','Lubuntu','Ubuntu'],
|
||||
['mate','mate','Ubuntu MATE','Ubuntu'],
|
||||
['studio','studio','Ubuntu Studio','Ubuntu'],
|
||||
['xebian','xebian','Xebian','Debian'],
|
||||
['xubuntu','xubuntu','Xubuntu','Ubuntu'],
|
||||
);
|
||||
my $tests = 'budgie,cinna,edub,plasma,kylin,lubu,mate,studio,xebi,xubu';
|
||||
$tests = join(':',
|
||||
main::globber("/etc/xdg/xdg-*{$tests}*"));
|
||||
# xdg is poor since only works in gui
|
||||
foreach my $spin (@spins){
|
||||
if ($name !~ /$spin->[0]/i && (
|
||||
($ENV{'XDG_CONFIG_DIRS'} && $ENV{'XDG_CONFIG_DIRS'} =~ /$spin->[1]/i) ||
|
||||
($tests && $tests =~ /$spin->[1]/i))){
|
||||
$name =~ s/\b$spin->[3]/$spin->[2]/i;
|
||||
last;
|
||||
}
|
||||
}
|
||||
eval $end if $b_log;
|
||||
return $name;
|
||||
}
|
||||
}
|
||||
|
||||
## DmidecodeData
|
||||
|
|
Loading…
Reference in a new issue