[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r11027 - trunk

From: Ben Reser <ben_at_reser.org>
Date: 2004-09-29 00:02:03 CEST

On Sat, Sep 18, 2004 at 11:41:21AM -0400, Greg Hudson wrote:
> On Fri, 2004-09-17 at 17:08, breser@tigris.org wrote:
> > +type pax &> /dev/null
> > +if [ ! $? ] && [ -z "$ZIP" ]; then
>
> This redirection syntax is bash-specific and the [ ! $? ] test simply
> won't work, since "test" is not like C.
>
> type pax > /dev/null 2>&1
> if [ $? -ne 0 ] && [ -z "$ZIP" ]; then

Yup sorry about that. I was thinking dist.sh was already bash specific.
Guess it wasn't will fix.

> I would suggest the somewhat cooler:
>
> if [ -z "$ZIP" ] && ! type pax > /dev/null 2>&1; then
>
> but it won't work with deficient /bin/sh implementations like Solaris's,
> although it should work with any POSIX shell (such as the
> /usr/xpg4/bin/sh on Solaris).

Which mean we might as well just use the former.

-- 
Ben Reser <ben@reser.org>
http://ben.reser.org
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Sep 29 00:02:31 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.