[107013] trunk/dports/devel
Lawrence Velázquez
larryv at macports.org
Sat Jun 15 22:29:23 PDT 2013
On Jun 16, 2013, at 12:58 AM, Ryan Schmidt <ryandesign at macports.org> wrote:
> On Jun 15, 2013, at 23:28, Adam Mercer <ram at macports.org> wrote:
>
>> On Sat, Jun 15, 2013 at 8:29 PM, Ryan Schmidt <ryandesign at macports.org> wrote:
>>
>>>> +post-destroot {
>>>> + # These scripts are intended to be sourced, not executed
>>>> + system "chmod 644 ${destroot}${prefix}/share/globus/globus-build-env-*.sh"
>>>> +}
>>>
>>> Should use [file attributes -permissions] instead of running a shell to run chmod. [glob] and [eval] may also be helpful.
>>
>> Are there any examples of using this, as I can't find reference to
>> this in the guide?
http://www.tcl.tk/man/tcl8.4/TclCmd/file.htm#M6
> Off the top of my head I was going to suggest:
>
> post-destroot {
> eval file attributes [glob ${destroot}${prefix}/share/globus/globus-build-env-*.sh] -permissions 0644
> }
>
> 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
%
vq
More information about the macports-dev
mailing list