Re: tcl expert needed

2012-06-03 Thread Keith J. Schultz
Hi Bjarne, If I get you right you want to save yourself alot of typing! So, why not simply divide your code up a little. proc g_doSomething args { xinstall -d ${where}[dict get ${apache} libexecdir] /do a lot of stuff/ } Then in whatever phase you are in set where in the script and call

Re: tcl expert needed

2012-06-03 Thread Bjarne D Mathiesen
Ryan Schmidt wrote: > > On Jun 2, 2012, at 18:34, Bjarne D Mathiesen wrote: > >> 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

Re: tcl expert needed

2012-06-02 Thread Ryan Schmidt
On Jun 2, 2012, at 18:34, Bjarne D Mathiesen wrote: > 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 t

Re: tcl expert needed

2012-06-02 Thread Bjarne D Mathiesen
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

Re: tcl expert needed

2012-06-02 Thread Jeremy Lavergne
> 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 p

Re: tcl expert needed

2012-06-02 Thread Bjarne D Mathiesen
Is it possble within a Portfile to determine which phase is being executed ??? 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 :-) Happy Hacking :-) -- Bjarne D Mathi

tcl expert needed

2012-05-31 Thread Bjarne D Mathiesen
I've got the following piece of tcl script : +++ script start +++ proc filesys dirPath { try { foreach filePath [glob -directory ${dirPath} *] { ui_msg "[file size ${filePath}] :: ${filePath}" if { [file isdirectory ${filePath}] } { filesys ${fil