* testsuite/config-guess.sh: Fix issues identified by Shellcheck.

* testsuite/config-sub.sh: Likewise.
This commit is contained in:
Ben Elliston 2017-10-26 22:31:18 +11:00
parent c003e5cb94
commit d07fa31c34
3 changed files with 10 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2017-10-26 Ben Elliston <bje@gnu.org>
* testsuite/config-guess.sh: Fix issues identified by Shellcheck.
* testsuite/config-sub.sh: Likewise.
2017-09-26 Ben Elliston <bje@gnu.org> 2017-09-26 Ben Elliston <bje@gnu.org>
* config.guess: Output a note that a C compiler may be needed when * config.guess: Output a note that a C compiler may be needed when

View File

@ -8,7 +8,7 @@
# the simulated uname(1) output and the expected GNU system triplet. # the simulated uname(1) output and the expected GNU system triplet.
verbose=false verbose=false
PATH=`pwd`:$PATH PATH=$(pwd):$PATH
run_config_guess () run_config_guess ()
{ {
@ -29,13 +29,13 @@ run_config_guess ()
[ \$1 = -p ] && echo "@PROCESSOR@" && exit 0 [ \$1 = -p ] && echo "@PROCESSOR@" && exit 0
EOF EOF
chmod +x uname chmod +x uname
output=`sh ../config.guess 2>/dev/null` output=$(sh ../config.guess 2>/dev/null)
if test $? != 0 ; then if test $? != 0 ; then
echo "FAIL: unable to guess $machine:$release:$system:$version" echo "FAIL: unable to guess $machine:$release:$system:$version"
rc=1 rc=1
continue continue
fi fi
if test $output != $triplet ; then if test "$output" != "$triplet" ; then
echo "FAIL: $output (expected $triplet)" echo "FAIL: $output (expected $triplet)"
rc=1 rc=1
continue continue

View File

@ -12,8 +12,8 @@ verbose=false
run_config_sub () run_config_sub ()
{ {
rc=0 rc=0
while read alias canonical ; do while read -r alias canonical ; do
output=`sh ../config.sub $alias` output=$(sh ../config.sub "$alias")
if test "$output" != "$canonical" ; then if test "$output" != "$canonical" ; then
echo "FAIL: $alias -> $output, but expected $canonical" echo "FAIL: $alias -> $output, but expected $canonical"
rc=1 rc=1