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ørgrav writes:
> Doug Barton <dougb@FreeBSD.org> writes:
>> 1. A "better" way (IMO) to write:
>>
>> if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
>>
>> is
>>
>> case "${BRANCH_OVERRIDE}" in
>> '') ;;
>> *) BRANCH=${BRANCH_OVERRIDE} ;;
>> esac
>
> ITYM [ -z "${BRANCH_OVERRIDE}" ]
The "original" reason why the "X-comparing" was used is that there are some
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 not
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>
