cvs commit: src/sys/conf newvers.sh

Oliver Lehmann lehmann at ans-netz.de
Fri Aug 19 11:51:06 GMT 2005


Dag-Erling Smørgrav writes: 

> Doug Barton <dougb at 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


More information about the cvs-src mailing list