Subject: Re: bin/5231: makewhatis does not deal with multiple MANDIR's
To: Tim Rightnour <root@garbled.net>
From: Geoff Wing <gcw@pobox.com>
List: netbsd-bugs
Date: 03/30/1998 22:31:53
Tim Rightnour wrote about Re: bin/5231: makewhatis does not deal with multiple MANDIR's:

Just a couple of optimisations.  Also, it may be worth considering
having a parent script which grabs the _whatdb lines from man.conf  and 
calls  makewhatis for each.  That way admins have the choice to manually
upgrade one  whatis.db without affecting anything else, or to automatically
upgrade all whatis.db's.

:MANX=`cat /etc/man.conf | grep '^_whatdb' | awk '{print $2}' | xargs`

  MANX=`grep '^_whatdb' < /etc/man.conf | awk '{print $2}'`

Why cat?  Why xargs?

:for TMPWHAT in $MANX
:do
:    TMPDIR=`echo $TMPWHAT | sed 's/\/whatis.db//'`

  TMPDIR=`basename $TMPWHAT`

Since you're checking for directories on those anyway.  And use it again
afterwards.
-- 
Geoff Wing   <gcw@pobox.com>            Mobile : 0412 162 441
Work URL: http://www.primenet.com.au/   Ego URL: http://pobox.com/~gcw/