Leading space in output screwed it up. Should be fixed.

This commit is contained in:
Brett Bohnenkamper
2013-06-13 18:37:57 -05:00
parent 7af424b945
commit 2e0c3ef2a6

View File

@@ -692,7 +692,7 @@ detectcpu () {
else
cpu=$(awk 'BEGIN{FS=":"} /model name/ { gsub(/ +/," ",$2); gsub(/^ /,"",$2); gsub(/\(R\)|\(TM\)|\(tm\)| Processor/,"",$2); print $2; exit }' /proc/cpuinfo | sed 's/ @/\n/' | head -1)
if [ -z "$cpu" ]; then
cpu=$(awk 'BEGIN{FS=":"} /^cpu/ { gsub(/ +/," ",$2); print $2; exit}' /proc/cpuinfo | sed 's/, altivec supported//')
cpu=$(awk 'BEGIN{FS=":"} /^cpu/ { gsub(/ +/," ",$2); print $2; exit}' /proc/cpuinfo | sed 's/, altivec supported//;s/^ //')
if [[ $cpu =~ ^(PPC)*9.+ ]]; then
model="IBM PowerPC G5"
elif [[ $cpu =~ ^74.+ ]]; then