[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:
commit
b86f43e9ab
1 changed files with 5 additions and 5 deletions
10
neofetch
10
neofetch
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue