xinstall vs file copy/mkdir

Ryan Schmidt ryandesign at macports.org
Mon Oct 7 08:31:06 PDT 2013


On Oct 7, 2013, at 07:16, Davide Liessi <davide.liessi at gmail.com> wrote:

> Is there a preferred choice between xinstall and file Tcl extensions?
> Which one should I use?

For creating directories, they're pretty equivalent. If you need to specify ownership (which some ports like servers need) or permissions (which you almost never need for directories) xinstall is more convenient because it lets you do it all at once. Otherwise my rule of thumb is usually to use "xinstall" at destroot time and "file mkdir" otherwise.

For copying files, same rule of thumb. Also, "file copy" preserves modification times; "xinstall" touches the file so you get the current time. And "xinstall" has the convenient "-W" flag that lets you copy multiple files from a single directory without having to name that directory over and over.



More information about the macports-dev mailing list