Merge pull request #338 from dylanaraps/archdistro
Fix distro on new Arch linux installs. Fixes #336
This commit is contained in:
commit
909f710905
6
neofetch
6
neofetch
|
@ -139,18 +139,18 @@ getdistro() {
|
|||
# Workarounds are included in every shorthand option
|
||||
case "$distro_shorthand" in
|
||||
"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)"
|
||||
;;
|
||||
|
||||
"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'=' '/^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 '/BLAG/ {print $1; exit}' /etc/*ease)"
|
||||
[ -z "$distro" ] && distro="$(awk -F'=' '/^DISTRIB_DESCRIPTION=/ {print $2}' /etc/openwrt_release)"
|
||||
|
|
Reference in New Issue