From 598afeec959456e840a6ed74bc96cf0b47eefabd Mon Sep 17 00:00:00 2001 From: Jacob Bachmeyer Date: Tue, 25 May 2021 23:59:02 -0500 Subject: [PATCH] config.guess: manual fixups after previous automatic patch The tool could not handle command substitutions that span lines, but fortunately there were only two such substitutions in the script. The test for which universe is active on Pyramid is rewritten into a case block because it was the only use of a command substitution as an argument to the test command, which would require quoting. * config.guess: Rewrite "if" for Pyramid systems to "case". --- config.guess | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/config.guess b/config.guess index d51f050..ba627c8 100755 --- a/config.guess +++ b/config.guess @@ -202,10 +202,10 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". - UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \ + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ - echo unknown)) + echo unknown)` case $UNAME_MACHINE_ARCH in aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; @@ -398,11 +398,10 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - GUESS=pyramid-pyramid-sysv3 - else - GUESS=pyramid-pyramid-bsd - fi + case `(/bin/universe) 2>/dev/null` in + att) GUESS=pyramid-pyramid-sysv3 ;; + *) GUESS=pyramid-pyramid-bsd ;; + esac ;; NILE*:*:*:dcosx) GUESS=pyramid-pyramid-svr4 @@ -657,8 +656,8 @@ EOF IBM_ARCH=powerpc fi if test -x /usr/bin/lslpp ; then - IBM_REV=$(/usr/bin/lslpp -Lqc bos.rte.libc | - awk -F: '{ print $3 }' | sed s/[0-9]*$/0/) + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi