summaryrefslogtreecommitdiffstats
path: root/scripts/libptxdist.sh
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2010-07-23 09:50:46 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2010-08-02 07:44:29 +0200
commiteea905f9cc99c4197579c0fefefdbdad59eb5f8d (patch)
tree010402fa304ac727d080ab379377b8f714ebef07 /scripts/libptxdist.sh
parente027330751dd78225bd01ad11013d1a0c14f4467 (diff)
downloadptxdist-eea905f9cc99c4197579c0fefefdbdad59eb5f8d.tar.gz
ptxdist-eea905f9cc99c4197579c0fefefdbdad59eb5f8d.tar.xz
[ptxd_make_log] provide stdout on PTXDIST_FD_STDOUT
With ptxd_make_log, the filedescriptor 1 (stdout) goes into a "tee" process and is written into the logfile and out the original stdout. Some tools don't provide status information if their stdout isn't a tty. This patch clones the original stdout to filedescriptor $PTXDIST_FD_STDOUT (==5). Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'scripts/libptxdist.sh')
-rw-r--r--scripts/libptxdist.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/libptxdist.sh b/scripts/libptxdist.sh
index 4c64559ca..8cd8ee7a2 100644
--- a/scripts/libptxdist.sh
+++ b/scripts/libptxdist.sh
@@ -351,13 +351,15 @@ ptxd_make_log() {
#
# fd3 == stdout to logfile
# fd4 == stderr to logfile
+ # fd5 == clean stdout
#
{
+ export PTXDIST_FD_STDOUT=5
{
if [ -z "${PTXDIST_QUIET}" ]; then
ptxd_make "${@}" 4>&- |
# make's stdout on fd0
- tee -a "${PTX_LOGFILE}" 2>&4 4>&-
+ tee -a "${PTX_LOGFILE}" 2>&4 4>&- 5>&-
check_pipe_status || return
else
exec 4>&-
@@ -365,9 +367,9 @@ ptxd_make_log() {
fi
} 2>&1 1>&3 3>&- |
# make's stderr on fd0
- tee -a "${PTX_LOGFILE}" 1>&2 3>&- 4>&-
+ tee -a "${PTX_LOGFILE}" 1>&2 3>&- 4>&- 5>&-
check_pipe_status || return
- } 3>&1 4>&2
+ } 3>&1 4>&2 5>&1
}