diff options
-rwxr-xr-x | abuild.in | 24 |
1 files changed, 20 insertions, 4 deletions
@@ -53,27 +53,43 @@ fi # functions msg() { + [ -n "$quiet" ] && return 0 local prompt="$GREEN>>>${NORMAL}" local fake="${FAKEROOTKEY:+${BLUE}*${NORMAL}}" local name="${STRONG}${subpkgname:-$pkgname}${NORMAL}" - [ -z "$quiet" ] && printf "${prompt} ${name}${fake}: $@\n" >&2 + printf "${prompt} ${name}${fake}: %s\n" "$1" >&2 +} + +msg2() { + [ -n "$quiet" ] && return 0 + # ">>> %s" + printf " %s\n" "$1" >&2 } warning() { local prompt="${YELLOW}>>> WARNING:${NORMAL}" local fake="${FAKEROOTKEY:+${BLUE}*${NORMAL}}" local name="${STRONG}${subpkgname:-$pkgname}${NORMAL}" - printf "${prompt} ${name}${fake}: $@\n" >&2 + printf "${prompt} ${name}${fake}: %s\n" "$1" >&2 +} + +warning2() { + # ">>> WARNING: + printf " %s\n" "$1" >&2 } error() { local prompt="${RED}>>> ERROR:${NORMAL}" local fake="${FAKEROOTKEY:+${BLUE}*${NORMAL}}" local name="${STRONG}${subpkgname:-$pkgname}${NORMAL}" - printf "${prompt} ${name}${fake}: $@\n" >&2 + printf "${prompt} ${name}${fake}: %s\n" "$1" >&2 +} + +error2() { + # ">>> ERROR: + printf " %s\n" "$1" >&2 } - set_xterm_title() { if [ "$TERM" = xterm ] && [ -n "$USE_COLORS" ]; then printf "\033]0;$1\007" >&2 |