diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-09-14 11:41:03 +0100 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-09-14 11:45:28 +0100 |
| commit | d9ca4265ef58d58d1068b67cec445f7baec80528 (patch) | |
| tree | 8742d5b6d8f37dc1341f15c720c62ad5640cc73e | |
| parent | b32dd39262daf03a3025b62a9cee4d252382f2dd (diff) | |
mk: remove xprintf
totally useless function. all it does is print
quotes. just printf the args into awk
this does literally the same thing. the output
will literally be the same.
unclear thinking == unclear code
right thinking == this patch
Signed-off-by: Leah Rowe <leah@libreboot.org>
| -rwxr-xr-x | mk | 18 |
1 files changed, 2 insertions, 16 deletions
@@ -50,7 +50,8 @@ err() elif [ $# -gt 1 ]; then printf "ERROR %s: %s: in command with args: " "$0" "$1" 1>&2 shift 1 - xprintf "$@" 1>&2 + printf '%s\n' "$@" | awk '{printf "\"%s\" ", $0}' + printf "\n" else printf "ERROR, but no arguments provided to err\n" 1>&2 fi @@ -58,21 +59,6 @@ err() exit 1 } -xprintf() -{ - xprintfargs=0 - while [ $# -gt 0 ]; do - printf "\"%s\"" "$1" - [ $# -gt 1 ] && \ - printf " " - - xprintfargs=1 - shift 1 - done - [ $xprintfargs -gt 0 ] && \ - printf "\n"; : -} - ( xbarg0="$0" [ "${xbarg0##*/}" = "$xbarg0" ] && \ |
