Fix Armbian version detection
This commit is contained in:
parent
0e0613588e
commit
f04bca3045
1 changed files with 15 additions and 6 deletions
9
neofetch
9
neofetch
|
@ -1009,12 +1009,21 @@ get_distro() {
|
||||||
esac
|
esac
|
||||||
|
|
||||||
elif type -p twistver >/dev/null; then
|
elif type -p twistver >/dev/null; then
|
||||||
|
if [[ -f /etc/armbian-release ]]; then
|
||||||
|
. /etc/armbian-release
|
||||||
|
case $distro_shorthand in
|
||||||
|
on) distro="$( twistver ) (Armbian ${VERSION})" ;;
|
||||||
|
tiny) distro="$( twistver ) (Armbian)" ;;
|
||||||
|
off) distro="$( twistver ) (Armbian ${VERSION} ${DISTRIBUTION_CODENAME})" ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
case $distro_shorthand in
|
case $distro_shorthand in
|
||||||
on) distro="$( twistver ) (${NAME} ${VERSION_ID})" ;;
|
on) distro="$( twistver ) (${NAME} ${VERSION_ID})" ;;
|
||||||
tiny) distro="$( twistver ) (${NAME})" ;;
|
tiny) distro="$( twistver ) (${NAME})" ;;
|
||||||
off) distro="$( twistver ) (${PRETTY_NAME}})" ;;
|
off) distro="$( twistver ) (${PRETTY_NAME}})" ;;
|
||||||
esac
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
elif type -p lsb_release >/dev/null; then
|
elif type -p lsb_release >/dev/null; then
|
||||||
case $distro_shorthand in
|
case $distro_shorthand in
|
||||||
|
|
Loading…
Reference in a new issue