On Apr 30, 2009, at 17:18, Darren Weber wrote:
Please take a look at this mess to reset RPATH for all libs in a set of binaries:system " cd ${build.dir};find ${destroot}/${vtkExamplePath}/bin | grep -e '\[^(bin)\]\$' > find.txt;for f in `cat find.txt`; do if \[ -f \${f} \] && \[ -x \${f} \]; then echo install_name_tool changing link libs for \${f}; otool -L \${f} | grep 'libvtk' > otool_libs.txt; for lib in `cat otool_libs.txt`; donewlib=`echo \${lib} | sed s#${build.dir}/bin#$ {prefix}/lib/${distname}#`;install_name_tool -change \${lib} \${newlib} \${f}; done; rm otool_libs.txt; fi; done; rm find.txt; " It works, but can it be done more efficiently?Can you do file tests in tcl, like the bash tests [ -f $f ] && [ -x $f ] ?
Sure, those are respectively "file isfile" and "file executable". Take a look at the manual for the file command:
http://wiki.tcl.tk/1041
PS, Don't ask me why it's required ;-)
I'm scared to... _______________________________________________ macports-dev mailing list [email protected] http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev
