[PR] dylanaraps/neofetch#2238 from RealStr1ke - Tweaked function for obtaining host model

Upstream PR: https://github.com/dylanaraps/neofetch/pull/2238
Thanks to @RealStr1ke

Co-authored-by: Azalea (on HyDEV-Daisy) <me@hydev.org>
This commit is contained in:
Hykilpikonna 2022-11-19 00:18:39 -05:00
commit b86f43e9ab
No known key found for this signature in database
GPG key ID: 256CD01A41D7FA26

View file

@ -1363,16 +1363,16 @@ get_model() {
if [[ -d /android/system/ || -d /system/app/ ]]; then
model="$(getprop ro.product.brand) $(getprop ro.product.model)"
elif [[ -f /sys/devices/virtual/dmi/id/board_vendor ||
-f /sys/devices/virtual/dmi/id/board_name ]]; then
model=$(< /sys/devices/virtual/dmi/id/board_vendor)
model+=" $(< /sys/devices/virtual/dmi/id/board_name)"
elif [[ -f /sys/devices/virtual/dmi/id/product_name ||
-f /sys/devices/virtual/dmi/id/product_version ]]; then
model=$(< /sys/devices/virtual/dmi/id/product_name)
model+=" $(< /sys/devices/virtual/dmi/id/product_version)"
elif [[ -f /sys/devices/virtual/dmi/id/board_vendor ||
-f /sys/devices/virtual/dmi/id/board_name ]]; then
model=$(< /sys/devices/virtual/dmi/id/board_vendor)
model+=" $(< /sys/devices/virtual/dmi/id/board_name)"
elif [[ -f /sys/firmware/devicetree/base/model ]]; then
model=$(< /sys/firmware/devicetree/base/model)