Fix trailing whitespace in cpu name

This commit is contained in:
Dylan 2016-01-24 23:36:54 +11:00
parent b80b09376a
commit 7e42f0c5c3
1 changed files with 10 additions and 8 deletions

18
fetch
View File

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