xinstall glob question

nox n.oxyde at gmail.com
Thu Apr 30 06:51:31 PDT 2009


Le 30 avr. 09 à 00:37, Rainer Müller a écrit :

> 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

And on a side note, [glob -directory ${dir} ${pattern}] should be  
preferred over
[glob ${dir}/${pattern}], see glob(n).



More information about the macports-dev mailing list