lib.sh: use xprintf in x_

don't echo the arguments

this new logic shows quotes, in error outputs.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-09-13 11:50:44 +01:00
parent 333739961a
commit edcf8cead8
+3 -2
View File
@@ -149,8 +149,8 @@ dx_()
x_() x_()
{ {
[ $# -lt 1 ] || [ -n "$1" ] || err "Empty first arg: x_ $(echo "$@")" [ $# -lt 1 ] || [ -n "$1" ] || err "Empty first arg: x_ $(xprintf "$@")"
[ $# -lt 1 ] || "$@" || err "Unhandled error for: $(echo "$@")"; : [ $# -lt 1 ] || "$@" || err "Unhandled error for: $(xprintf "$@")"; :
} }
xchk() xchk()
@@ -167,6 +167,7 @@ xprintf()
while [ $# -gt 0 ]; do while [ $# -gt 0 ]; do
printf "\"%s\"" "$1" printf "\"%s\"" "$1"
xprintfargs=1 xprintfargs=1
[ $# -gt 1 ] && printf " "; :
shift 1 shift 1
done done
[ $xprintfargs -gt 0 ] && printf "\n"; : [ $xprintfargs -gt 0 ] && printf "\n"; :