Fix trailing whitespace in cpu name
This commit is contained in:
parent
b80b09376a
commit
7e42f0c5c3
18
fetch
18
fetch
|
@ -559,7 +559,8 @@ getcpu () {
|
||||||
# Get cpu name
|
# Get cpu name
|
||||||
cpu="$(grep -F 'model name' /proc/cpuinfo)"
|
cpu="$(grep -F 'model name' /proc/cpuinfo)"
|
||||||
cpu=${cpu/model name*: /}
|
cpu=${cpu/model name*: /}
|
||||||
cpu=${cpu/ @*/}
|
cpu=${cpu%% *}
|
||||||
|
cpu=${cpu/@*/}
|
||||||
|
|
||||||
# Get cpu speed
|
# Get cpu speed
|
||||||
case "$distro" in
|
case "$distro" in
|
||||||
|
@ -658,13 +659,14 @@ getcpu () {
|
||||||
|
|
||||||
# Remove uneeded patterns from cpu output
|
# Remove uneeded patterns from cpu output
|
||||||
# This is faster than sed/gsub
|
# This is faster than sed/gsub
|
||||||
cpu=${cpu//(tm)/}
|
cpu=${cpu//'(tm)'}
|
||||||
cpu=${cpu//(TM)/}
|
cpu=${cpu//'(TM)'}
|
||||||
cpu=${cpu//(r)/}
|
cpu=${cpu//'(r)'}
|
||||||
cpu=${cpu//(R)/}
|
cpu=${cpu//'(R)'}
|
||||||
cpu=${cpu// CPU/}
|
cpu=${cpu// 'CPU'}
|
||||||
cpu=${cpu// Processor/}
|
cpu=${cpu// 'Processor'}
|
||||||
cpu=${cpu// Six-Core/}
|
cpu=${cpu// 'Six-Core'}
|
||||||
|
cpu=${cpu// 'with Radeon HD Graphics'}
|
||||||
}
|
}
|
||||||
|
|
||||||
getgpu () {
|
getgpu () {
|
||||||
|
|
Reference in New Issue