[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bootstrap patch

From: Eric Blake
Subject: Re: bootstrap patch
Date: Mon, 27 Jan 2014 12:35:37 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

On 01/27/2014 12:24 PM, Gary V. Vaughan wrote:
> Hi Eric,
>> On Jan 28, 2014, at 2:30 AM, Eric Blake <address@hidden> wrote:
>>> On 01/26/2014 11:08 AM, Bruce Korb wrote:
>>> Hi,
>>> "test -f .git"?  Do you mean "test -d .git"?
>> No, because .git can be a symlink, in which case test -d .git fails but
>> test -f .git passes.
> Urgh. Now I'm confused... the manual page for test on my Mac says that
> -f passes if the argument exists and is a regular file. A directory is not a
> regular file, so -f would fail (on MacOS at least), no?

Uggh.  'test -e' tests for existence of both regular files, symlinks,
and directories; but is not portable.  'test -r' is a reasonable
substitute.  But gnulib seems to be doing just fine with 'test -d .git',
rather than worrying about the case when .git is a symlink rather than
an actual directory.  At this point, I say we just stick to 'test -d'
until someone provides a counterexample that doesn't work, rather than
worrying about theory.

Sorry for the added confusion.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]