generic wmic cpu support
This commit is contained in:
parent
0e11900adb
commit
93d8341bad
1 changed files with 5 additions and 0 deletions
|
@ -23,6 +23,11 @@ if [ "$hasawk" -eq 1 ] && [ "$system_type" = "linux" ] || [ "$system_type" = "wi
|
||||||
processor="$(cat /proc/cpuinfo | grep "Processor" | head -n 1 | awk -F ": " '{print $2}')"
|
processor="$(cat /proc/cpuinfo | grep "Processor" | head -n 1 | awk -F ": " '{print $2}')"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
if [ "$hassed" -eq 1 ] && [ "$system_type" = "windows" ] && [ -z "$processor" ]; then
|
||||||
|
if [ -n "$(wmic.exe cpu get name | sed -n 2p | head -n 1)" ]; then
|
||||||
|
processor="$(wmic.exe cpu get name | sed -n 2p | head -n 1)"
|
||||||
|
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