From 1f13b0da637d5059ba3414008fb57f51943582e1 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Wed, 9 Jun 2004 14:46:04 +0000 Subject: [PATCH] - dump log in case of error --- build.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index e9557507..c5e56c79 100755 --- a/build.sh +++ b/build.sh @@ -4,7 +4,7 @@ # crontabs to build nightly releases (default). Can also be invoked # manually to build a tagged release (-r) in the current directory. # -# $Id: build.sh,v 1.3 2004/05/26 18:44:50 mlh-pl_rpm Exp $ +# $Id: build.sh,v 1.4 2004/05/26 18:50:15 mlh-pl_rpm Exp $ # # Set defaults @@ -45,9 +45,17 @@ while ! mkdir ${BASE}${i} 2>/dev/null ; do done BASE=${BASE}${i} -# Redirect both stdout and stderr to log file -exec &>${BASE}/log - # Build +( cvs -d ${CVSROOT} export -r ${TAG} -d ${BASE} ${MODULE} make -C ${BASE} +) >${BASE}/log 2>&1 + +# Dump log +if [ $? -ne 0 ] ; then + if [ -f ${BASE}/log ] ; then + tail -100 ${BASE}/log + else + echo "Error $?" + fi +fi -- 2.47.0