common/bin/logger.sh
changeset 12801 948f8ad66ee7
parent 12258 6ec26f6cc53e
child 14111 2a82ecb35fc7
--- a/common/bin/logger.sh	Wed Jul 05 18:12:32 2017 +0200
+++ b/common/bin/logger.sh	Thu Jun 07 20:25:06 2012 -0700
@@ -37,10 +37,9 @@
 
 # Create a temporary directory to store the result code from
 # the wrapped command.
-RCDIR=`mktemp -d tmp.XXXXXX` || exit $?
-trap "rm -rf '$RCDIR'" EXIT
+RCDIR=`mktemp -dt jdk-build-logger.tmp.XXXXXX` || exit $?
+trap "rm -rf \"$RCDIR\"" EXIT
 LOGFILE=$1
 shift
-(exec 3>&1 ; ("$@" 2>&1 1>&3; echo $? > $RCDIR/rc) | tee -a $LOGFILE 1>&2 ; exec 3>&-) | tee -a $LOGFILE
-exit `cat $RCDIR/rc`
-
+(exec 3>&1 ; ("$@" 2>&1 1>&3; echo $? > "$RCDIR/rc") | tee -a $LOGFILE 1>&2 ; exec 3>&-) | tee -a $LOGFILE
+exit `cat "$RCDIR/rc"`