]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
standalone: Log things we are running via with_logging
authorIan Campbell <ian.campbell@citrix.com>
Fri, 4 Dec 2015 15:27:59 +0000 (15:27 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Tue, 8 Dec 2015 14:51:24 +0000 (14:51 +0000)
Turning on set -x generally in this script is too verbose, so run the
command in a subshell which sets -x.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
standalone

index c804b74498e0284e78d795df32d12c5acb4becbe..499cb6c1d70869ea4513232d95472e8a4956b8df 100755 (executable)
@@ -195,7 +195,7 @@ with_logging() {
     if command -v savelog >/dev/null ; then
         savelog -c 300 -n "$log" >/dev/null
     fi
-    "$@" 2>&1 | tee "$log"
+    ( set -x ; "$@" ) 2>&1 | tee "$log"
     rc=${PIPESTATUS[0]}
     if [ $rc -ne 0 ] ; then
        echo "FAILED rc=${rc}" >&2