From: Ian Campbell Subject: [PATCH OSSTEST v2] standalone: Log things we are running via with_logging Date: Fri, 4 Dec 2015 15:27:59 +0000 Message-ID: <1449242879-6456-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: ian.jackson@eu.citrix.com, xen-devel@lists.xen.org Cc: Ian Campbell List-Id: xen-devel@lists.xenproject.org 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 --- v2: Use set -x in a sub shell --- standalone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/standalone b/standalone index c804b74..499cb6c 100755 --- a/standalone +++ b/standalone @@ -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 -- 2.6.1