Revision 9135
Added by Aaron Marcuse-Kubitza almost 12 years ago
lib/sh/util.sh | ||
---|---|---|
207 | 207 |
## external commands |
208 | 208 |
|
209 | 209 |
function command() # usage: [stderr_is_errors=1] command extern_cmd... |
210 |
# to view only explicitly-displayed errors: errors_only=1 script... |
|
210 | 211 |
{ |
211 | 212 |
set -- -- "$@" # prepend -- so command name not treated as `command` option |
212 | 213 |
set -- builtin command "$@" |
... | ... | |
344 | 345 |
} |
345 | 346 |
set_global_fds |
346 | 347 |
|
348 |
# show only explicitly-displayed errors (which have been redirected to fd 22) |
|
349 |
# most of the time this has the same effect as `verbosity=0 script...` |
|
350 |
if test "$explicit_errors_only"; then exec 2>/dev/null; fi |
|
347 | 351 |
|
352 |
|
|
348 | 353 |
#### vars |
349 | 354 |
|
350 | 355 |
set_var() { eval "$1"'="$2"'; } |
Also available in: Unified diff
lib/sh/util.sh: added $explicit_errors_only env var which shows only explicitly-displayed errors (those which have been redirected to fd 22). note that most of the time, this has the same effect as `verbosity=0 script...`.