Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update KSLinux detection due to kpt and kpm command is removed #395

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions neofetch
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,15 @@ get_distro() {
elif type -p lsb_release >/dev/null; then
# Debian does not include .x versions in /etc/os-version, but does in debian_version
# So if that file exists, and we are not *buntu, build name from there
if [[ -f /etc/debian_version ]] && [[ $(lsb_release -si) != *"buntu"* ]] && [[ $(lsb_release -si) != *"neon"* ]]; then
if [[ $(lsb_release -si) = *"KSLinux"* ]]
then
. /etc/os-release
case $distro_shorthand in
on) distro=${NAME} ;;
tiny) distro=${NAME} ;;
*) distro="${NAME} ${VERSION}" ;;
esac
elif [[ -f /etc/debian_version ]] && [[ $(lsb_release -si) != *"buntu"* ]] && [[ $(lsb_release -si) != *"neon"* ]]; then
. /etc/os-release
case $distro_shorthand in
on) distro="${NAME}" ;;
Expand Down Expand Up @@ -1257,10 +1265,6 @@ get_distro() {
elif type -p tazpkg >/dev/null; then
distro="SliTaz $(< /etc/slitaz-release)"

elif type -p kpt >/dev/null && \
type -p kpm >/dev/null; then
distro=KSLinux

elif [[ -d /system/app/ && -d /system/priv-app ]]; then
distro="Android $(getprop ro.build.version.release)"

Expand Down Expand Up @@ -2237,7 +2241,6 @@ get_packages() {
fi

# Other (Needs complex command)
has kpm-pkg && ((packages+=$(kpm --get-selections | grep -cv deinstall$)))

nix-user-pkgs() {
if [ -d ~/.nix-profile ]; then
Expand Down