index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | scripts/library/output_format.sh | 16 |
diff --git a/scripts/library/output_format.sh b/scripts/library/output_format.sh index 9e890e76..18f1f588 100644 --- a/scripts/library/output_format.sh +++ b/scripts/library/output_format.sh @@ -1,21 +1,27 @@ +plain() { + (( QUIET )) && return + local mesg=$1; shift + printf "${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1 +} + msg() { (( QUIET )) && return local mesg=$1; shift - printf "==> ${mesg}\n" "$@" >&1 + printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1 } msg2() { (( QUIET )) && return local mesg=$1; shift - printf " -> ${mesg}\n" "$@" >&1 + printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&1 } warning() { local mesg=$1; shift - printf "==> $(gettext "WARNING:") ${mesg}\n" "$@" >&2 + printf "${YELLOW}==> $(gettext "WARNING:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2 } error() { local mesg=$1; shift - printf "==> $(gettext "ERROR:") ${mesg}\n" "$@" >&2 -}
\ No newline at end of file + printf "${RED}==> $(gettext "ERROR:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2 +} |