[41224] trunk/dports/ruby/rb-cocoa
Ryan Schmidt
ryandesign at macports.org
Tue Oct 28 15:58:52 PDT 2008
On Oct 28, 2008, at 17:46, Toby Peterson wrote:
> On Tue, Oct 28, 2008 at 12:52 PM, Ryan Schmidt wrote:
>
>> On Oct 28, 2008, at 08:45, kimuraw at macports.org wrote:
>>
>>> +post-extract {
>>> + cd ${worksrcpath}
>>> + system "find . -type d -name '.svn' | xargs /bin/rm -rf"
>>> +}
>>
>> Could you change this to not use the cd command, please? The cd
>> command will
>> not be available in MacPorts 1.7.0 and later. Try:
>>
>> system "find ${worksrcpath} -type d -name '.svn' | xargs /bin/rm -rf"
>
> Seems potentially dangerous if ${worksrcpath} happens to contain
> spaces
>
> find ${worksrcpath} -type d -name '.svn' -exec rm -r '{}' \;
worksrcpaths containing spaces are pretty dangerous already, which is
why ports don't generally have them.
If you really need to support such paths, you'll need quotes around
the worksrcpath:
find "${worksrcpath}" -type d -name '.svn' -exec rm -r '{}' \;
Or the original way:
find "${worksrcpath}" -type d -name '.svn' -print0 | xargs -0 /bin/rm
-rf
More information about the macports-dev
mailing list