mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +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 ##
|
## INXI INFO ##
|
||||||
my $self_name='pinxi';
|
my $self_name='pinxi';
|
||||||
my $self_version='3.3.31';
|
my $self_version='3.3.31';
|
||||||
my $self_date='2023-11-06';
|
my $self_date='2023-11-07';
|
||||||
my $self_patch='07';
|
my $self_patch='08';
|
||||||
## END INXI INFO ##
|
## END INXI INFO ##
|
||||||
|
|
||||||
my ($b_pledge,@pledges);
|
my ($b_pledge,@pledges);
|
||||||
|
@ -31168,8 +31168,8 @@ sub get_linux_distro {
|
||||||
elsif (-d '/etc/salixtools/' && $distro =~ /Slackware/i){
|
elsif (-d '/etc/salixtools/' && $distro =~ /Slackware/i){
|
||||||
$distro =~ s/Slackware/Salix/;
|
$distro =~ s/Slackware/Salix/;
|
||||||
}
|
}
|
||||||
# check for spins
|
# check for spins, relies on xdg directory name
|
||||||
elsif ($distro =~ /^(Debian|Ubuntu)/i){
|
elsif ($distro =~ /^(Ubuntu)/i){
|
||||||
my $base = $1;
|
my $base = $1;
|
||||||
my $temp = distro_spin($distro);
|
my $temp = distro_spin($distro);
|
||||||
if ($temp ne $distro){
|
if ($temp ne $distro){
|
||||||
|
@ -31521,6 +31521,41 @@ sub get_os_release {
|
||||||
return $distro_osr;
|
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
|
# args: 0: optional: debian codename
|
||||||
sub debian_id {
|
sub debian_id {
|
||||||
eval $start if $b_log;
|
eval $start if $b_log;
|
||||||
|
@ -31612,38 +31647,6 @@ sub ubuntu_id {
|
||||||
eval $end if $b_log;
|
eval $end if $b_log;
|
||||||
return $id;
|
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
|
## DmidecodeData
|
||||||
|
|
Loading…
Reference in a new issue