[PR] #191 from BKasin/debian-version
[F] Use /etc/debian_version to get .x on Debian
This commit is contained in:
commit
54d82ff557
1 changed files with 16 additions and 6 deletions
22
neofetch
22
neofetch
|
@ -1169,12 +1169,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