[107013] trunk/dports/devel

Ryan Schmidt ryandesign at macports.org
Mon Jun 17 02:31:46 PDT 2013


On Jun 16, 2013, at 11:50, Adam Mercer wrote:
> On Sun, Jun 16, 2013 at 12:29 AM, Lawrence Velázquez wrote:
>> That's assuming [file attributes] accepts multiple filenames in a single invocation… which the documentation does not confirm. If that isn't allowed, then an [fs-traverse] loop could be used.
>> 
>> "file attributes" doesn't accept multiple filenames.
>> 
>>    % file attributes /bin/zsh -permissions
>>    00755
>>    % file attributes /bin/zsh /bin/bash -permissions
>>    bad option "/bin/bash": must be -group, -owner, -permissions, -readonly, -creator, -type, -hidden, or -rsrclength
>>    %
> 
> OK, thanks so we'd need to use something like:
> 
> post-destroot {
>    # These scripts are intended to be sourced, not executed
>    fs-traverse item ${destroot}${prefix}/share/globus/ {
>        file attributes ${item} -permissions 0644
>    }
> }
> 
> or even:
> 
> post-destroot {
>    # These scripts are intended to be sourced, not executed
>    foreach f [glob -tails -directory
> ${destroot}${prefix}/share/globus globus-build-env-*.sh] {
>        file attributes ${f} -permissions 0644
>    }
> }

Yes the foreach with glob is probably easiest. fs-traverse is great for traversing a deep directory when you don't know where the files you want are, but here you already know.



More information about the macports-dev mailing list