Cpu speed is still bugged.
This commit is contained in:
parent
2bcfdab6d1
commit
8ce6cee20e
12
fetch.sh
12
fetch.sh
|
@ -472,10 +472,20 @@ getcpu () {
|
||||||
|
|
||||||
"Windows")
|
"Windows")
|
||||||
# Get cpu name
|
# Get cpu name
|
||||||
cpu="$(grep 'model name' /proc/cpuinfo)"
|
cpu="$(grep 'model name' /proc/cpuinfo) @ 4.2GHz"
|
||||||
cpu=${cpu/model name*: /}
|
cpu=${cpu/model name*: /}
|
||||||
cpu=${cpu// /}
|
cpu=${cpu// /}
|
||||||
cpu=${cpu% }
|
cpu=${cpu% }
|
||||||
|
cpu=${cpu/@*/}
|
||||||
|
|
||||||
|
speed=$(grep 'cpu MHz' /proc/cpuinfo)
|
||||||
|
speed=${speed/cpu MHz*: /}
|
||||||
|
speed=${speed/\./}
|
||||||
|
|
||||||
|
# Convert mhz to ghz without bc
|
||||||
|
speed=$((${speed} / 100000))
|
||||||
|
speed=${speed:0:1}.${speed:1}
|
||||||
|
cpu="$cpu @ ${speed}GHz"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|
Reference in New Issue