Revision 9007
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/util.sh | ||
---|---|---|
91 | 91 |
if isset verbose; then : "${verbosity:=$(bool2int "$verbose")}"; fi |
92 | 92 |
: "${verbosity=3}" # default |
93 | 93 |
: "${verbosity:=0}" # ensure non-empty |
94 |
declare -i verbosity # ensure integer |
|
94 | 95 |
export verbosity # propagate the verbosity to invoked commands |
95 | 96 |
|
96 | 97 |
can_log () { test "$verbosity" -gt 0; } # verbosity=0 turns off all logging |
Also available in: Unified diff
lib/util.sh: $verbosity: ensure it's an integer using `declare -i`