copy or xinstall? directory -exclude subdirectory

Ryan Schmidt ryandesign at
Fri Dec 30 15:05:01 PST 2011

On Dec 29, 2011, at 20:48, Mark Brethen wrote:

> On Dec 23, 2011, at 1:48 AM, Joshua Root wrote:
>> On 2011-12-23 14:20 , Mark Brethen wrote:
>>> Can either the copy or xinstall extension copy the contents of a directory, excluding certain files or subdirectories?
>> No, you'd need to use something like fs-traverse to do that in Tcl. This
>> is one case where shelling out to run e.g. rsync could result in more
>> concise code and possibly even be faster.
>> - Josh
> Something like:
> spawn rsync --no-perms --exclude "/regressions/***" ${worksrcpath}/packages/ ${sharedir}/packages/

Something like. In MacPorts we typically use "system" (if you just want to run a command) or "exec" (if you need to capture its output). Don't think we've used "spawn" anywhere before and not sure what the difference there would be so I'd recommend avoiding it.

More information about the macports-dev mailing list