Revision 9654
Added by Aaron Marcuse-Kubitza over 11 years ago
util.sh | ||
---|---|---|
587 | 587 |
fi |
588 | 588 |
fi |
589 | 589 |
|
590 |
cmd2rel_path; echo_cmd "$@" "${redirs[@]}"
|
|
590 |
cmd2rel_path |
|
591 | 591 |
|
592 |
# print cmd |
|
593 |
( |
|
594 |
# print <>file redirs before cmd, because they introduce it |
|
595 |
local file_redirs=() |
|
596 |
while test "${#redirs[@]}" -gt 0 && starts_with '[<>][^&]' "${redirs[0]}" |
|
597 |
do |
|
598 |
file_redirs+=("${redirs[0]} \\ |
|
599 |
") |
|
600 |
redirs=("${redirs[@]:1}") |
|
601 |
done |
|
602 |
echo_cmd "${file_redirs[@]}$@" "${redirs[@]}" |
|
603 |
) |
|
604 |
|
|
592 | 605 |
# add after echoing command so it isn't echoed at the end of every command |
593 | 606 |
if test "$cmd_log_fd" != 2; then # fd 2 not used for logging |
594 | 607 |
redirs+=("2>&$err_fd") # assume fd 2 used for errors |
Also available in: Unified diff
lib/sh/util.sh: command(): print <>file redirects before command, because they introduce it