[F] Fix chromeOS (again!)
https://github.com/dylanaraps/neofetch/issues/1949 https://github.com/dylanaraps/neofetch/issues/1653 https://github.com/dylanaraps/neofetch/issues/1384
This commit is contained in:
parent
8f8ecb7b94
commit
206fa8d726
1 changed files with 9 additions and 10 deletions
19
neofetch
19
neofetch
|
@ -1131,13 +1131,7 @@ get_distro() {
|
|||
elif [[ -d /system/app/ && -d /system/priv-app ]]; then
|
||||
distro="Android $(getprop ro.build.version.release)"
|
||||
|
||||
# Chrome OS doesn't conform to the /etc/*-release standard.
|
||||
# While the file is a series of variables they can't be sourced
|
||||
# by the shell since the values aren't quoted.
|
||||
elif [[ -f /etc/lsb-release && $(< /etc/lsb-release) == *CHROMEOS* ]]; then
|
||||
distro='Chrome OS'
|
||||
|
||||
elif [[ -f /etc/vzlinux-release ]]; then
|
||||
elif [[ -f /etc/vzlinux-release ]]; then
|
||||
distro='VzLinux'
|
||||
|
||||
elif type -p guix >/dev/null; then
|
||||
|
@ -1200,14 +1194,19 @@ get_distro() {
|
|||
*) distro+=" on Windows $windows_version" ;;
|
||||
esac
|
||||
|
||||
# Chrome OS doesn't conform to the /etc/*-release standard.
|
||||
# While the file is a series of variables they can't be sourced
|
||||
# by the shell since the values aren't quoted.
|
||||
elif [[ -f /etc/lsb-release && $(< /etc/lsb-release) == *CHROMEOS* ]]; then
|
||||
distro='Chrome OS'
|
||||
|
||||
elif [[ $(< /proc/version) == *chrome-bot* || -f /dev/cros_ec ]]; then
|
||||
[[ $distro != *Chrome* ]] &&
|
||||
case $distro_shorthand in
|
||||
on) distro+=" [Chrome OS]" ;;
|
||||
on) distro="Chrome OS $distro" ;;
|
||||
tiny) distro="Chrome OS" ;;
|
||||
*) distro+=" on Chrome OS" ;;
|
||||
*) distro="Chrome OS $distro" ;;
|
||||
esac
|
||||
distro=${distro## on }
|
||||
fi
|
||||
|
||||
distro=$(trim_quotes "$distro")
|
||||
|
|
Loading…
Reference in a new issue