Merge pull request #338 from dylanaraps/archdistro

Fix distro on new Arch linux installs. Fixes #336
This commit is contained in:
Dylan Araps 2016-10-01 10:36:32 +10:00 committed by GitHub
commit 909f710905
1 changed files with 3 additions and 3 deletions

View File

@ -139,18 +139,18 @@ getdistro() {
# Workarounds are included in every shorthand option # Workarounds are included in every shorthand option
case "$distro_shorthand" in case "$distro_shorthand" in
"on") "on")
distro="$(awk -F'=' '/^NAME|VERSION_ID=/ {print $2}' /etc/*ease)" distro="$(awk -F'=' '/^NAME|VERSION_ID=/ {print $2; exit}' /etc/*ease /usr/lib/*ease)"
[ -z "$distro" ] && distro="$(awk -F'=' '/^DISTRIB_ID|DISTRIB_RELEASE=/ {print $2}' /etc/openwrt_release)" [ -z "$distro" ] && distro="$(awk -F'=' '/^DISTRIB_ID|DISTRIB_RELEASE=/ {print $2}' /etc/openwrt_release)"
;; ;;
"tiny") "tiny")
distro="$(awk -F'=' '/^NAME=/ {print $2}' /etc/*ease)" distro="$(awk -F'=' '/^NAME=/ {print $2; exit}' /etc/*ease /usr/lib/*ease)"
[ -z "$distro" ] && distro="$(awk -F'=' '/^TAILS_PRODUCT_NAME=/ {print $2}' /etc/*ease)" [ -z "$distro" ] && distro="$(awk -F'=' '/^TAILS_PRODUCT_NAME=/ {print $2}' /etc/*ease)"
[ -z "$distro" ] && distro="$(awk -F'=' '/^DISTRIB_ID=/ {print $2}' /etc/openwrt_release)" [ -z "$distro" ] && distro="$(awk -F'=' '/^DISTRIB_ID=/ {print $2}' /etc/openwrt_release)"
;; ;;
*) *)
distro="$(awk -F'=' '/^PRETTY_NAME=/ {print $2}' /etc/*ease)" distro="$(awk -F'=' '/^PRETTY_NAME=/ {print $2; exit}' /etc/*ease /usr/lib/*ease)"
[ -z "$distro" ] && distro="$(awk -F'=' '{print $2}' /etc/*ease)" [ -z "$distro" ] && distro="$(awk -F'=' '{print $2}' /etc/*ease)"
[ -z "$distro" ] && distro="$(awk '/BLAG/ {print $1; exit}' /etc/*ease)" [ -z "$distro" ] && distro="$(awk '/BLAG/ {print $1; exit}' /etc/*ease)"
[ -z "$distro" ] && distro="$(awk -F'=' '/^DISTRIB_DESCRIPTION=/ {print $2}' /etc/openwrt_release)" [ -z "$distro" ] && distro="$(awk -F'=' '/^DISTRIB_DESCRIPTION=/ {print $2}' /etc/openwrt_release)"