Revision 9006
Added by Aaron Marcuse-Kubitza almost 12 years ago
lib/util.sh | ||
---|---|---|
87 | 87 |
# `|| return` needed on Mac because of bug where -e doesn't apply to () |
88 | 88 |
stdout2stderr () { exec >&2; } |
89 | 89 |
|
90 |
# set verbosity |
|
90 | 91 |
if isset verbose; then : "${verbosity:=$(bool2int "$verbose")}"; fi |
91 |
|
|
92 |
: "${verbosity=3}" |
|
93 |
|
|
94 |
: "${verbosity:=0}" |
|
92 |
: "${verbosity=3}" # default |
|
93 |
: "${verbosity:=0}" # ensure non-empty |
|
95 | 94 |
export verbosity # propagate the verbosity to invoked commands |
96 | 95 |
|
97 | 96 |
can_log () { test "$verbosity" -gt 0; } # verbosity=0 turns off all logging |
Also available in: Unified diff
lib/util.sh: grouped set verbosity statements together and commented them