Fix whitespace issue with NetBSD cpu speed
This commit is contained in:
parent
0b8587cc24
commit
7e073ef573
1 changed files with 2 additions and 1 deletions
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:]]/}
|
||||||
;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Reference in a new issue