On Jul 13, 2014, at 3:28 PM, Jeremy Lavergne <[email protected]> wrote:

> I’d use fs-traverse, filtering to just the specific files you’re after.
> 
> On Jul 13, 2014, at 16:18, Mark Brethen <[email protected]> wrote:
> 
>> In need to reinplace the CMakeLists file in each subdirectory, replacing 
>> 'Mod/(subdirectory)' with 'lib/${name}/Mod/(subdirectory). How do you write 
>> a tcl loop to accomplish this? (Avoids creating a multitude of patch files.)
> 

Will this traverse the subdirectories?

    fs-traverse file ${worksrcpath}/src/Mod {
        if [string match {/CMakeLists.txt$} ${file}] {
            reinplace "s| Mod/| lib/${name}/Mod/|g" ${file}
        }
    }

Mark




_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to