This commit is contained in:
Azalea (on HyDEV-Daisy) 2022-08-23 11:01:05 -04:00
commit 25ca95df8a
No known key found for this signature in database
GPG key ID: E289FAC0DA92DD2B
5 changed files with 75 additions and 13 deletions

View file

@ -1138,14 +1138,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
@ -1208,14 +1202,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")