summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xabuild.in24
1 files changed, 20 insertions, 4 deletions
diff --git a/abuild.in b/abuild.in
index e885d03..e01d0fe 100755
--- a/abuild.in
+++ b/abuild.in
@@ -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