[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
|
||||
|
||||
elif type -p lsb_release >/dev/null; then
|
||||
case $distro_shorthand in
|
||||
on) lsb_flags=-si ;;
|
||||
tiny) lsb_flags=-si ;;
|
||||
*) lsb_flags=-sd ;;
|
||||
esac
|
||||
distro=$(lsb_release "$lsb_flags")
|
||||
# Debian does not include .x versions in /etc/os-version, but does in debian_version
|
||||
if [[ -f /etc/debian_version ]]; then
|
||||
. /etc/os-release
|
||||
case $distro_shorthand in
|
||||
on) distro="${NAME}" ;;
|
||||
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 || \
|
||||
-f /usr/lib/os-release || \
|
||||
|
|
Loading…
Reference in a new issue