[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CVS: cvs.openbsd.org: src

Module name:	src
Changes by:	krw_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org	2002/04/28 18:59:35

Modified files:
	distrib/miniroot: install.sub 

Log message:
Rely on [] evaluating empty string as false, non-empty string as true
to eliminate a lot of -z and -n tests.


'[ -z "$x" ] && cmd' -> '[ "$x" ] || cmd'
'if [ -z "$x" ]; then; y; fi' -> '[ "$x" ] || y'.
'[ -n "$x" ]' -> '[ "$x" ]'

Use variable default value syntax in a couple of places rather than if
statements. e.g. ': ${_ouranswer:=$_ifs}'.

Suggestions from millert@, aaron@, espie@, miod@ at various times.

Visit your host, monkey.org