Fix whitespace issue with NetBSD cpu speed
This commit is contained in:
parent
0b8587cc24
commit
7e073ef573
3
fetch
3
fetch
|
@ -582,10 +582,11 @@ getcpu () {
|
||||||
speed="$(grep -F 'cpu MHz' /proc/cpuinfo)"
|
speed="$(grep -F 'cpu MHz' /proc/cpuinfo)"
|
||||||
speed=${speed/cpu MHz*: /}
|
speed=${speed/cpu MHz*: /}
|
||||||
speed=${speed/'.'/}
|
speed=${speed/'.'/}
|
||||||
speed=$((speed / 100))
|
speed=$((speed / 10000))
|
||||||
speed=${speed:0:1}.${speed:1}
|
speed=${speed:0:1}.${speed:1}
|
||||||
|
|
||||||
cpu="$cpu @ ${speed}GHz"
|
cpu="$cpu @ ${speed}GHz"
|
||||||
|
cpu=${cpu/[[:space:]]/}
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|
Reference in New Issue