[F] Use /etc/debian_version to get .x on Debian
/etc/os-release on Debian only reports the major version, so use mix os-release and debian_version to build PRETTY_NAME. Signed-off-by: Bailey Kasin <baileykasin@gmail.com>
This commit is contained in:
parent
74d1bb5622
commit
ff8f9b2879
1 changed files with 16 additions and 6 deletions
22
neofetch
22
neofetch
|
@ -1159,12 +1159,22 @@ get_distro() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif type -p lsb_release >/dev/null; then
|
elif type -p lsb_release >/dev/null; then
|
||||||
case $distro_shorthand in
|
# Debian does not include .x versions in /etc/os-version, but does in debian_version
|
||||||
on) lsb_flags=-si ;;
|
if [[ -f /etc/debian_version ]]; then
|
||||||
tiny) lsb_flags=-si ;;
|
. /etc/os-release
|
||||||
*) lsb_flags=-sd ;;
|
case $distro_shorthand in
|
||||||
esac
|
on) distro="${NAME}" ;;
|
||||||
distro=$(lsb_release "$lsb_flags")
|
tiny) distro="$(lsb_release -si)" ;;
|
||||||
|
*) distro="${NAME} $(< /etc/debian_version) (${VERSION_CODENAME})" ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
case $distro_shorthand in
|
||||||
|
on) lsb_flags=-si ;;
|
||||||
|
tiny) lsb_flags=-si ;;
|
||||||
|
*) lsb_flags=-sd ;;
|
||||||
|
esac
|
||||||
|
distro=$(lsb_release "$lsb_flags")
|
||||||
|
fi
|
||||||
|
|
||||||
elif [[ -f /etc/os-release || \
|
elif [[ -f /etc/os-release || \
|
||||||
-f /usr/lib/os-release || \
|
-f /usr/lib/os-release || \
|
||||||
|
|
Loading…
Reference in a new issue