Subject: Re: [Linux] why isn't ${TEST} the shell builtin?
To: None <tech-pkg@NetBSD.org>
From: James K. Lowden <jklowden@schemamania.org>
List: tech-pkg
Date: 07/03/2004 14:33:20
On Sun, 4 Jul 2004 <grant@NetBSD.org> wrote:
> 
> the /bin/sh builtin test doesn't understand -e, while ksh understands
> both -e and -f. so I guess all instances of:
> 
> 	if [ -e $file ]; ...
> 
> in bsd.pkg.mk should become -f, and all instances of ${TEST} -e the
> same.
> 
> bmake is built with SH=/bin/sh on Solaris and the main pkgsrc
> framework is designed to work with that, but ksh is used everywhere
> else because it breaks far less packages.

I read that -r is a better substitute in general for -e.  I'm not sure
pkgsrc cares, but -r and -e return true for pipes and directories, and -f
doesn't.  

--jkl