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
1 changed files with 4 additions and 3 deletions

View File

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