[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS: cvs.openbsd.org: src
- To: source-changes_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org
- Subject: CVS: cvs.openbsd.org: src
- From: Kenneth R Westerback <krw_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org>
- Date: Sun, 28 Apr 2002 18:59:36 -0600 (MDT)
CVSROOT: /cvs
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.
Thus,
'[ -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