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

* Update KSLinux detection due to kpt and kpm command is removed

* Fix Bugs
This commit is contained in:
Yuki Kurosawa 2025-04-06 13:03:39 +08:00 committed by GitHub
parent 45ee7e199e
commit d2dfd950a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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}" ;;
@ -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)"
@ -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