Distro: Simplify shorthand for lsb_release

This commit is contained in:
Dylan Araps 2016-10-25 10:30:41 +11:00
parent 192014ca9f
commit ab1de702f9

View file

@ -131,10 +131,11 @@ getdistro() {
elif type -p lsb_release >/dev/null 2>&1; then elif type -p lsb_release >/dev/null 2>&1; then
case "$distro_shorthand" in case "$distro_shorthand" in
"on") distro="$(lsb_release -sir 2>/dev/null)" ;; "on") lsb_flags="-sir" ;;
"tiny") distro="$(lsb_release -si 2>/dev/null)" ;; "tiny") lsb_flags="-si" ;;
*) distro="$(lsb_release -sd 2>/dev/null)" ;; *) lsb_flags="-sd" ;;
esac esac
distro="$(lsb_release $lsb_flags 2>/dev/null)"
elif type -p guix >/dev/null 2>&1; then elif type -p guix >/dev/null 2>&1; then
distro="GuixSD" distro="GuixSD"