I'll be following this intently as I have a project I'm working on that will use s6 heavily even discretely.
Sent from my Windows Phone ________________________________ From: Avery Payne<mailto:[email protected]> Sent: 1/7/2015 11:58 PM To: [email protected]<mailto:[email protected]> Subject: Re: thoughts on rudimentary dependency handling On Wed, Jan 7, 2015 at 6:53 PM, Laurent Bercot <[email protected]> wrote: > > Unfortunately, the envdir tool, which I use to abstract away the daemons >> and settings, only chain-loads; it would be nice if it had a persistence >> mechanism, so that I could "load once" for the scope of the shell script. >> > > Here's an ugly hack that allows you do that using envdir: > set -a > eval $({ env; envdir ../.env env; } | grep -vF -e _= -e SHLVL= | sort | > uniq -u) > set +a > Thanks! When I can carve out a bit of time this week I'll put it in and finish up the few bits needed. Most of the dependency loop is already written, I just didn't have a somewhat clean way of pulling in the $CMDWHATEVER settings without repeatedly reading ./env over and over. > It only works for variables you add, though, not for variables you remove. It will work fine. I'm attempting to pre-load values that will remain constant inside the scope of the script, so there isn't a need to change them at runtime.
