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,8 +38,10 @@ if [ "$subtype" = "proxmox" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ "$subtype" = "android" ]; then
|
if [ "$subtype" = "android" ]; then
|
||||||
|
if [ -n "$(getprop ro.product.manufacturer)$(getprop ro.product.model)" ]; then
|
||||||
machine="$(getprop ro.product.manufacturer) $(getprop ro.product.model)"
|
machine="$(getprop ro.product.manufacturer) $(getprop ro.product.model)"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$system_type" = "openbsd" ]; then
|
if [ "$system_type" = "openbsd" ]; then
|
||||||
if [ "$hasawk" -eq 1 ]; then
|
if [ "$hasawk" -eq 1 ]; 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)"
|
processor="$(wmic.exe cpu get name | sed -n 2p | head -n 1)"
|
||||||
fi
|
fi
|
||||||
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 [ "$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
|
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 " ")"
|
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