Distro: Separate ChromeOS detection
This commit is contained in:
parent
3b34a78c4c
commit
39cd3ede32
1 changed files with 9 additions and 8 deletions
17
neofetch
17
neofetch
|
@ -58,14 +58,7 @@ get_distro() {
|
|||
|
||||
case "$os" in
|
||||
"Linux" | "BSD" | "MINIX")
|
||||
if [[ "$(< /proc/version)" == *"chrome-bot"* || -f "/dev/cros_ec" ]]; then
|
||||
case "$distro_shorthand" in
|
||||
"on") distro="$(lsb_release -sir) [Chrome OS]" ;;
|
||||
"tiny") distro="Chrome OS" ;;
|
||||
*) distro="$(lsb_release -sd) on Chrome OS" ;;
|
||||
esac
|
||||
|
||||
elif [[ -f "/etc/redstar-release" ]]; then
|
||||
if [[ -f "/etc/redstar-release" ]]; then
|
||||
case "$distro_shorthand" in
|
||||
"on" | "tiny") distro="Red Star OS" ;;
|
||||
*) distro="Red Star OS $(awk -F'[^0-9*]' '$0=$2' /etc/redstar-release)"
|
||||
|
@ -163,7 +156,15 @@ get_distro() {
|
|||
"tiny") distro="Windows 10" ;;
|
||||
*) distro+=" on Windows 10" ;;
|
||||
esac
|
||||
|
||||
elif [[ "$(< /proc/version)" == *"chrome-bot"* || -f "/dev/cros_ec" ]]; then
|
||||
case "$distro_shorthand" in
|
||||
"on") distro+=" [Chrome OS]" ;;
|
||||
"tiny") distro="Chrome OS" ;;
|
||||
*) distro+=" on Chrome OS" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
distro="$(trim_quotes "$distro")"
|
||||
distro="${distro/'NAME='}"
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue