mirror of
git://git.savannah.gnu.org/config.git
synced 2025-05-26 09:06:38 +12:00
config.guess: fix shellcheck warning SC2154
While, according to Plan 9 documentation, the environment variable $cputype is set to the name of the kernel's CPU's architecture, shellcheck warns that cputype is referenced but not assigned. Be on the safe side and do not use cputype if it is not defined or empty. * config.guess (*:Plan9:*:*): Fix shellcheck warning SC2154.
This commit is contained in:
parent
9a37c126ce
commit
4550d2f15b
5
config.guess
vendored
5
config.guess
vendored
@ -1437,10 +1437,9 @@ EOF
|
||||
# "uname -m" is not consistent, so use $cputype instead. 386
|
||||
# is converted to i386 for consistency with other x86
|
||||
# operating systems.
|
||||
# shellcheck disable=SC2154
|
||||
if test "$cputype" = 386; then
|
||||
if test "${cputype-}" = 386; then
|
||||
UNAME_MACHINE=i386
|
||||
else
|
||||
elif test "x${cputype-}" != x; then
|
||||
UNAME_MACHINE="$cputype"
|
||||
fi
|
||||
echo "$UNAME_MACHINE"-unknown-plan9
|
||||
|
Loading…
x
Reference in New Issue
Block a user