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, [EMAIL PROTECTED] 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


_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Reply via email to