Revision 9078
Added by Aaron Marcuse-Kubitza about 11 years ago
lib/sh/util.sh | ||
---|---|---|
158 | 158 |
log "$*" |
159 | 159 |
} |
160 | 160 |
|
161 |
echo_run() { cmd2rel_path; echo_cmd "$@"; "$@"; } |
|
161 |
echo_run() { cmd2rel_path; echo_cmd "$@"; indent; "$@"; }
|
|
162 | 162 |
|
163 | 163 |
# usage: (limit_stderr; cmd...) || return |
164 | 164 |
# `|| return` needed on Mac because of bug where -e doesn't apply to() |
... | ... | |
169 | 169 |
case "$1" in echo_run) shift; cmd2rel_path; echo_cmd "$@";; esac |
170 | 170 |
(limit_stderr |
171 | 171 |
if test "$stdout2stderr"; then stdout2stderr; fi |
172 |
"$@" |
|
172 |
indent; "$@"
|
|
173 | 173 |
) || return |
174 | 174 |
} |
175 | 175 |
alias limit_stderr_cmd='limit_stderr_cmd ' # last space alias-expands next word |
Also available in: Unified diff
lib/sh/util.sh: echo_run() and derivatives (limit_stderr_cmd()): use new `indent` before the invoked command so its own logging messages, if any, are indented