On Tue, Aug 07, 2007 at 02:21:05PM -0700, Dan Nicholson wrote:
> On 8/7/07, Daniel Stone <[EMAIL PROTECTED]> wrote:
> > On Tue, Aug 07, 2007 at 02:03:19PM -0700, Dan Nicholson wrote:
> > > Actually, I think the problem here is that `test' on Solaris sh can't
> > > handle -e. Just use -f instead. It respects real files or symlinks.
> >
> > -f on zsh/bash, at least, is regular files only, and not symlinks, hence
> > the use of -L also.
> 
> Hmm, on bash it seems to work for me. Can't hurt, though.
> 
> $ bash
> $ touch foo
> $ ln -svf foo bar
> `bar' -> `foo'
> $ [ -f bar ]
> $ echo $?
> 0

Ah.  I don't have any files in ~ (only directories), so that explains
it.  It looks through the symlink, so:
[EMAIL PROTECTED]:~% ln -s x/xorg/xserver foo
[EMAIL PROTECTED]:~% test -f foo
zsh: exit 1
[EMAIL PROTECTED]:~% rm foo
[EMAIL PROTECTED]:~% ln -s x/xorg/xserver/configure.ac foo
[EMAIL PROTECTED]:~% test -f foo
[EMAIL PROTECTED]:~% 

Meaning you could just make the entire thing 'if test -f
configs/current'.  Heh.

Cheers,
Daniel

Attachment: signature.asc
Description: Digital signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to