xinstall glob question
Joshua Root
jmr at macports.org
Thu Apr 30 15:02:46 PDT 2009
Darren Weber wrote:
>
>
> On Wed, Apr 29, 2009 at 3:37 PM, Rainer Müller <raimue at macports.org
> <mailto:raimue at macports.org>> wrote:
>
> Darren Weber wrote:
> > The {!<pattern>} syntax is supposed to NOT that file name
> <pattern>. I
> > have a directory of binary executables among a lot of .dylib files
> and I
> > want to exclude all the .dylib files from the glob.
>
> Tcl's glob is unable to invert a pattern. As you say, {!...} is not
> going to work.
>
> Some example how I would do this (untested!):
>
> foreach f [glob ${build.dir}/bin/*] {
> if {![string match {*.dylib} ${f}]} {
> file copy ${f} ${destroot}/${vtkExamplePath}/bin/
> }
> }
>
> Rainer
>
>
>
> Will the tcl 'file copy' work recursively? Some of the items from
> ${build.dir}/bin are .app directories.
Yes, see `man n file`. In Portfiles, you can use 'copy' as a synonym for
'file copy' BTW. <http://guide.macports.org/#reference.tcl-extensions>
- Josh
More information about the macports-dev
mailing list