summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-09-13 11:50:44 +0100
committerLeah Rowe <leah@libreboot.org>2025-09-13 11:50:44 +0100
commitedcf8cead8bc04bca1a29ad50acdb835c936cafd (patch)
tree97297805f2e64e6941a4fcb16f7c6950e83f0092 /include
parent333739961aba2920405fb5399679bc7a9db81796 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/lib.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/lib.sh b/include/lib.sh
index 7728a4c6..63aea2b7 100644
--- a/include/lib.sh
+++ b/include/lib.sh
@@ -149,8 +149,8 @@ dx_()
x_()
{
- [ $# -lt 1 ] || [ -n "$1" ] || err "Empty first arg: x_ $(echo "$@")"
- [ $# -lt 1 ] || "$@" || err "Unhandled error for: $(echo "$@")"; :
+ [ $# -lt 1 ] || [ -n "$1" ] || err "Empty first arg: x_ $(xprintf "$@")"
+ [ $# -lt 1 ] || "$@" || err "Unhandled error for: $(xprintf "$@")"; :
}
xchk()
@@ -167,6 +167,7 @@ xprintf()
while [ $# -gt 0 ]; do
printf "\"%s\"" "$1"
xprintfargs=1
+ [ $# -gt 1 ] && printf " "; :
shift 1
done
[ $xprintfargs -gt 0 ] && printf "\n"; :