[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] maint: make some shell and perl scripts executable in 'tests
From: |
Eric Blake |
Subject: |
Re: [PATCH] maint: make some shell and perl scripts executable in 'tests/' |
Date: |
Mon, 22 Jul 2013 07:29:02 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 |
On 07/21/2013 05:14 PM, Bernhard Voelker wrote:
> On 07/22/2013 12:22 AM, Pádraig Brady wrote:
>> How about something like this instead?
>>
>> find tests/ \( -name '*.sh' -o -name '*.pl' \) \! -perm /111 -print |
>> grep . && { echo ...; exit 1; }
>
> Good idea! I knew it was ugly.
>
> Thanks for the review!
> 2 nits:
>
> a) find ! -perm /111 will find only files with *any* of ugo=x set;
> we need ! -perm -111, don't we?
-perm /111 is a GNU extension, -perm -111 is required by POSIX. Are we
trying to make this check runnable by people that are not using GNU
findutils? Then again, in this particular case, I think we want -111
(exact match) rather than /111 (inclusive match), which delays the worry
about whether we need GNU extensions in the first place.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature