This commit is contained in:
BomberFish 2023-03-15 14:44:59 -04:00
parent 5f39250003
commit 93639996bb

View file

@ -1114,7 +1114,7 @@ get_distro() {
elif [[ $(< /proc/version) == *chrome-bot* || -f /dev/cros_ec ]]; then elif [[ $(< /proc/version) == *chrome-bot* || -f /dev/cros_ec ]]; then
# gets chrome os version from /etc/lsb-release. # gets chrome os version from /etc/lsb-release.
# totally not written by chatgpt :trolley: # totally not written by chatgpt :trolley:
cros_version=$(grep -oE 'CHROMEOS_RELEASE_BRANCH_NUMBER=([0-9]+)' /etc/lsb-release | cut -d= -f2) cros_version=$(grep -oE 'CHROMEOS_RELEASE_CHROME_MILESTONE=([0-9]+)' /etc/lsb-release | cut -d= -f2)
[[ $distro != *Chrome* ]] && [[ $distro != *Chrome* ]] &&
case $distro_shorthand in case $distro_shorthand in
on) distro+=" [Chrome OS $cros_version]" ;; on) distro+=" [Chrome OS $cros_version]" ;;