xtensa-build-zephyr: fix "die()" function

It still looks smart but the \n addition compared to the original
version in xtensa-build-all.sh broke it for more advanced cases:

die '%s %d' str 5
-bash ERROR: -bash: printf: 5\n: invalid number

As reported by shellcheck. shellcheck saves lives.

In scripts/xtensa-build-zephyr.sh line 22:
	>&2 printf "$@\n"
                       ^-- SC2145: Argument mixes string and array.
                        Use * or separate argument.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2021-04-28 15:13:47 -07:00 committed by Liam Girdwood
parent 80c482815b
commit 831bb3755b
1 changed files with 2 additions and 1 deletions

View File

@ -17,7 +17,8 @@ die()
>&2 printf '%s ERROR: ' "$0"
# We want die() to be usable exactly like printf
# shellcheck disable=SC2059
>&2 printf "$@\n"
>&2 printf "$@"
>&2 printf '\n'
exit 1
}