repo.or.cz
/
pacman-ng.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
scripts: refactor output formatting functions
[pacman-ng.git]
/
scripts
/
library
/
output_format.sh
blob
9e890e768ad4584735ee891ec105293abfa686a3
1
msg
() {
2
((
QUIET
)) &&
return
3
local
mesg
=
$1
;
shift
4
printf
"==>
${mesg}
\n
"
"$@"
>&
1
5
}
6
7
msg2
() {
8
((
QUIET
)) &&
return
9
local
mesg
=
$1
;
shift
10
printf
" ->
${mesg}
\n
"
"$@"
>&
1
11
}
12
13
warning
() {
14
local
mesg
=
$1
;
shift
15
printf
"==> $(gettext "
WARNING
:
")
${mesg}
\n
"
"$@"
>&
2
16
}
17
18
error
() {
19
local
mesg
=
$1
;
shift
20
printf
"==> $(gettext "
ERROR
:
")
${mesg}
\n
"
"$@"
>&
2
21
}