Pretty much, yes. I would also argue that (A) is clearer and easier
to read, to say nothing of more efficient. There are a number of
processes being spawned in (B) - one for the sh(1) to run the for
loop, another sh(1) to execute the find(1) in backticks, another for
the find(1) itself, then n cp(1) invocations inside the loop. That's
a lot more fork/execs (which are expensive in MacOSX) than (A) (one).
- Jordan
On Apr 29, 2009, at 11:42 AM, Jeremy Lavergne wrote:
Are these equivalent?
A.
eval xinstall -m 755 [glob {!${build.dir}/bin/*.dylib}] ${destroot}/
${vtkExamplePath}/bin
B.
cd ${build.dir}
for f in `find bin \! -name '*.dylib'`; do
cp $f ${destroot}/${vtkExamplePath}/bin"
done
The only difference I see is the mode setting.
Feel free to get a second opinion from the seasoned veterans :-)
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev