Add processor detection on linux/android
.
Also tweak how machine is detected on `linux/android`.
This commit is contained in:
parent
6bc504a4c9
commit
6dbe52089f
2 changed files with 8 additions and 1 deletions
|
@ -38,7 +38,9 @@ if [ "$subtype" = "proxmox" ]; then
|
|||
fi
|
||||
fi
|
||||
if [ "$subtype" = "android" ]; then
|
||||
machine="$(getprop ro.product.manufacturer) $(getprop ro.product.model)"
|
||||
if [ -n "$(getprop ro.product.manufacturer)$(getprop ro.product.model)" ]; then
|
||||
machine="$(getprop ro.product.manufacturer) $(getprop ro.product.model)"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$system_type" = "openbsd" ]; then
|
||||
|
|
|
@ -28,6 +28,11 @@ if [ "$hassed" -eq 1 ] && [ "$system_type" = "windows" ] && [ -z "$processor" ];
|
|||
processor="$(wmic.exe cpu get name | sed -n 2p | head -n 1)"
|
||||
fi
|
||||
fi
|
||||
if [ "$subtype" = "android" ]; then
|
||||
if [ -n "$(getprop ro.soc.manufacturer)$(getprop ro.soc.model)" ]; then
|
||||
machine="$(getprop ro.soc.manufacturer) $(getprop ro.soc.model)"
|
||||
fi
|
||||
fi
|
||||
if [ "$hassed" -eq 1 ] && [ "$hasawk" -eq 1 ] && [ -n "$processor" ]; then
|
||||
if [ -n "$(echo $processor | awk -F "@" '{print $1}' | sed "s/Processor//g" | sed "s/CPU//g" | sed "s/(R)//g" | sed "s/(r)//g" | sed "s/(TM)//g" | sed "s/(tm)//g" | tr -s " ")" ]; then
|
||||
processor="$(echo $processor | awk -F "@" '{print $1}' | sed "s/Processor//g" | sed "s/CPU//g" | sed "s/(R)//g" | sed "s/(r)//g" | sed "s/(TM)//g" | sed "s/(tm)//g" | tr -s " ")"
|
||||
|
|
Loading…
Reference in a new issue