Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Aug 2005 13:50:21 +0200
From:      "Oliver Lehmann" <lehmann@ans-netz.de>
To:        des@des.no (Dag-Erling =?utf-8?B?U23DuHJncmF2?=)
Cc:        cvs-src@FreeBSD.org, Doug Barton <dougb@FreeBSD.org>, Colin Percival <cperciva@FreeBSD.org>, cvs-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: cvs commit: src/sys/conf newvers.sh
Message-ID:  <20050819115021.79112.qmail@avocado.salatschuessel.net>
In-Reply-To: <867jeiguft.fsf@xps.des.no>
References:  <200508190356.j7J3uj5D095435@repoman.freebsd.org> <43059925.3090701@FreeBSD.org> <867jeiguft.fsf@xps.des.no>

next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Sm=C3=B8rgrav writes: 

> Doug Barton <dougb@FreeBSD.org> writes:
>> 1. A "better" way (IMO) to write: 
>>
>> if [ "X${BRANCH_OVERRIDE}" !=3D "X" ]; then 
>>
>> is 
>>
>> case "${BRANCH_OVERRIDE}" in
>> '')=09;;
>> *)=09BRANCH=3D${BRANCH_OVERRIDE} ;;
>> esac
> 
> ITYM  [ -z "${BRANCH_OVERRIDE}" ]

The "original" reason why the "X-comparing" was used is that there are so=
me 
ancient test/shell implementations with problems in case the variable to 
test starts with a minus-sign (-) because this will be interpreted as an 
argument. But since newvers.sh is only expected to run on FreeBSD it is n=
ot 
really needed but doesn't hurt too. 

  Greetings, Oliver



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