From owner-svn-src-head@FreeBSD.ORG Mon May 5 23:36:46 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A92EA56B; Mon, 5 May 2014 23:36:46 +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)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9761F1E9; Mon, 5 May 2014 23:36:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s45Nak5k034699; Mon, 5 May 2014 23:36:46 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s45Nakod034698; Mon, 5 May 2014 23:36:46 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201405052336.s45Nakod034698@svn.freebsd.org> From: Glen Barber Date: Mon, 5 May 2014 23:36:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r265406 - head/release/scripts 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.18 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: Mon, 05 May 2014 23:36:46 -0000 Author: gjb Date: Mon May 5 23:36:46 2014 New Revision: 265406 URL: http://svnweb.freebsd.org/changeset/base/265406 Log: Use 'return' instead of 'exit' in main(), since the script exits with the last returned exit code. Sponsored by: The FreeBSD Foundation Modified: head/release/scripts/relnotes-search.sh Modified: head/release/scripts/relnotes-search.sh ============================================================================== --- head/release/scripts/relnotes-search.sh Mon May 5 23:01:01 2014 (r265405) +++ head/release/scripts/relnotes-search.sh Mon May 5 23:36:46 2014 (r265406) @@ -56,7 +56,7 @@ main() { if [ -e "${where}" ]; then echo "Log file already exists:" echo " (${where})" - exit 2 + return 2 fi ;; r) @@ -64,7 +64,7 @@ main() { c=$(echo -n ${rev} | tr -d '0-9' | wc -c) if [ ${c} -ne 0 ]; then echo "Revision number must be numeric." - exit 2 + return 2 fi # Since the last specified revision is # specified, mangle the variable to @@ -101,25 +101,25 @@ main() { # Did we find svn? if [ -z "${svn}" ]; then echo "svn(1) binary not found." - exit 2 + return 2 fi # Is more than one path specified? (This should never # be triggered, because the argument count is checked # above, but better safe than sorry.) if [ $# -gt 1 ]; then echo "Cannot specify more than one working path." - exit 2 + return 2 fi # Does the directory exist? if [ ! -d "${1}" ]; then echo "Specified path (${1}) is not a directory." - exit 2 + return 2 fi # Is it a subversion repository checkout? ${svn} info ${1} >/dev/null 2>&1 if [ "$?" -ne 0 ]; then echo "Cannot determine svn repository information for ${1}" - exit 2 + return 2 fi # All tests passed. Let's see what can possibly go wrong