提交 aa9d896b 编写于 作者: R Richard Levitte

hinv may generate more than one line (1 line per CPU).

PR: 520
上级 42a55916
...@@ -473,7 +473,7 @@ echo Operating system: $GUESSOS ...@@ -473,7 +473,7 @@ echo Operating system: $GUESSOS
# more time that I want to waste at the moment # more time that I want to waste at the moment
case "$GUESSOS" in case "$GUESSOS" in
mips2-sgi-irix) mips2-sgi-irix)
CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'` CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
CPU=${CPU:-0} CPU=${CPU:-0}
if [ $CPU -ge 4000 ]; then if [ $CPU -ge 4000 ]; then
options="$options -mips2" options="$options -mips2"
...@@ -481,7 +481,7 @@ case "$GUESSOS" in ...@@ -481,7 +481,7 @@ case "$GUESSOS" in
OUT="irix-$CC" OUT="irix-$CC"
;; ;;
mips3-sgi-irix) mips3-sgi-irix)
CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'` CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
CPU=${CPU:-0} CPU=${CPU:-0}
if [ $CPU -ge 5000 ]; then if [ $CPU -ge 5000 ]; then
options="$options -mips4" options="$options -mips4"
...@@ -497,7 +497,7 @@ case "$GUESSOS" in ...@@ -497,7 +497,7 @@ case "$GUESSOS" in
echo " You have about 5 seconds to press Ctrl-C to abort." echo " You have about 5 seconds to press Ctrl-C to abort."
(stty -icanon min 0 time 50; read waste) < /dev/tty (stty -icanon min 0 time 50; read waste) < /dev/tty
fi fi
CPU=`(hinv -t cpu) 2>/dev/null | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'` CPU=`(hinv -t cpu) 2>/dev/null | head -1 | sed 's/^CPU:[^R]*R\([0-9]*\).*/\1/'`
CPU=${CPU:-0} CPU=${CPU:-0}
if [ $CPU -ge 5000 ]; then if [ $CPU -ge 5000 ]; then
options="$options -mips4" options="$options -mips4"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册