On Monday September 07 2020 22:39:50 Joshua Root wrote:

Thanks, will have a look.

>You do it like this:
><https://github.com/macports/macports-base/blob/master/src/macports1.0/macports.tcl#L3369-L3370>
>
>In that proc, $mport is an identifier that was returned from mportopen,
>and the code being executed in the port's interpreter is 'set $key',
>which could of course be replaced with any other code you want.

Sounds like maybe one can put a wrapper script in the hashbang that sets $key 
to the contents of the file it gets called with (and with which you could turn 
Portfiles into executables if you really wanted). Playtime! :)

>Activating an installed port will execute the pre/post-activate code
>that was in the Portfile when it was installed, not necessarily what's
>in the Portfile now.

Well of course, but that's not the reason as far as I can tell.

R.

Reply via email to