mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-09-19 21:20:31 +02:00
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>
This commit is contained in:
@@ -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" ] && \
|
||||
|
||||
Reference in New Issue
Block a user