scripts: refactor output formatting functions
[pacman-ng.git] / scripts / library / output_format.sh
blob9e890e768ad4584735ee891ec105293abfa686a3
1 msg() {
2 (( QUIET )) && return
3 local mesg=$1; shift
4 printf "==> ${mesg}\n" "$@" >&1
7 msg2() {
8 (( QUIET )) && return
9 local mesg=$1; shift
10 printf " -> ${mesg}\n" "$@" >&1
13 warning() {
14 local mesg=$1; shift
15 printf "==> $(gettext "WARNING:") ${mesg}\n" "$@" >&2
18 error() {
19 local mesg=$1; shift
20 printf "==> $(gettext "ERROR:") ${mesg}\n" "$@" >&2