tcl expert needed

Bjarne D Mathiesen macintosh at mathiesen.info
Sat Jun 2 16:34:32 PDT 2012


Jeremy Lavergne wrote:
>> I've got a problem where the same action has to be done, but depending
>> on whether I'm in /post-destroot/ or /post-activate/ I need to create
>> and install in different directories
> 
> That's precisely what the post-destroot and post-activate blocks do: they execute during post-destroot phase or post-activate phase, respectively.

I know that, but can I query a variable or something that tells me
exactly which phase I'm in ??? eg :

proc doSomething args {
    switch ${phase} {
    "destroot"      -
    "post-destroot" { set where "destroot" }
    "activate"      -
    "post-activate" { set where "" }
    }
    xinstall -d ${where}[dict get ${apache} libexecdir]
    /do a lot of stuff/
}

-- 
Bjarne D Mathiesen
København N ; Danmark ; Europa
----------------------------------------------------------------------
denne besked er skrevet i et totalt M$-frit miljø
MacOS X 10.7.3 Lion ; 2.8GHz Intel Core i7 ; 16GB 1067MHz DDR3


More information about the macports-dev mailing list