Revision 9005
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 |
if isset verbose; then : "${verbosity:=$(bool2int "$verbose")}"; fi |
|
91 |
|
|
90 | 92 |
: "${verbosity=3}" |
91 | 93 |
|
92 |
: "${verbosity:=$verbose}" "${verbosity:=0}"
|
|
94 |
: "${verbosity:=0}" |
|
93 | 95 |
export verbosity # propagate the verbosity to invoked commands |
94 | 96 |
|
95 | 97 |
can_log () { test "$verbosity" -gt 0; } # verbosity=0 turns off all logging |
Also available in: Unified diff
bugfix: lib/util.sh: verbose output: $verbosity defaults to $verbose (boolean) converted to integer. the previous set-default of $verbosity to $verbose has been removed because it came after `: "${verbosity=3}"` and thus didn't have an effect.