Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Aug 2005 10:53:27 +0200
From:      Stefan Farfeleder <stefanf@FreeBSD.org>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/conf newvers.sh
Message-ID:  <20050819085325.GT21905@wombat.fafoe.narf.at>
In-Reply-To: <43059925.3090701@FreeBSD.org>
References:  <200508190356.j7J3uj5D095435@repoman.freebsd.org> <43059925.3090701@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Aug 19, 2005 at 01:32:37AM -0700, Doug Barton wrote:

> 1. A "better" way (IMO) to write:
> 
> if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
> 
> is
> 
> case "${BRANCH_OVERRIDE}" in
> '')	;;
> *)	BRANCH=${BRANCH_OVERRIDE} ;;
> esac
> 
> The original reason for writing it this way was to avoid the call to 
> test(1), because case is a shell builtin. This is a style issue, and not a 
> "must have," but I thought I'd mention it.

[ is a shell built-in too.

Stefan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050819085325.GT21905>