cvs commit: src/sys/conf newvers.sh

Stefan Farfeleder stefanf at FreeBSD.org
Fri Aug 19 08:53:32 GMT 2005


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


More information about the cvs-all mailing list