Hykilpikonna 2022-08-20 20:10:53 -04:00
parent 8f8ecb7b94
commit 206fa8d726

View file

@ -1130,14 +1130,8 @@ 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")