From owner-svn-src-head@FreeBSD.ORG Fri Mar 14 19:46:19 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 838FB562; Fri, 14 Mar 2014 19:46:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 70A67758; Fri, 14 Mar 2014 19:46:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2EJkJY2056021; Fri, 14 Mar 2014 19:46:19 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2EJkJBW056020; Fri, 14 Mar 2014 19:46:19 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201403141946.s2EJkJBW056020@svn.freebsd.org> From: Warner Losh Date: Fri, 14 Mar 2014 19:46:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r263187 - head/tools/tools/nanobsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Mar 2014 19:46:19 -0000 Author: imp Date: Fri Mar 14 19:46:18 2014 New Revision: 263187 URL: http://svnweb.freebsd.org/changeset/base/263187 Log: Print an error message when we exit out early. PR: 136889 Submitted by: Aragon Gouveia Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Fri Mar 14 19:45:40 2014 (r263186) +++ head/tools/tools/nanobsd/nanobsd.sh Fri Mar 14 19:46:18 2014 (r263187) @@ -167,6 +167,13 @@ NANO_DATADIR="" # ####################################################################### +nano_cleanup ( ) ( + if [ $? -ne 0 ]; then + echo "Error encountered. Check for errors in last log file." 1>&2 + fi + exit $? +) + clean_build ( ) ( pprint 2 "Clean and create object directory (${MAKEOBJDIRPREFIX})" @@ -576,7 +583,8 @@ create_i386_diskimage ( ) ( fi mdconfig -d -u $MD - trap - 1 2 15 EXIT + trap - 1 2 15 + trap nano_cleanup EXIT ) > ${NANO_OBJ}/_.di 2>&1 ) @@ -929,6 +937,8 @@ if [ $# -gt 0 ] ; then usage fi +trap nano_cleanup EXIT + ####################################################################### # Setup and Export Internal variables #