RE: thoughts on rudimentary dependency handling

From: James Powell <james4591_at_hotmail.com>
Date: Thu, 8 Jan 2015 01:24:25 -0800

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:avery.p.payne_at_gmail.com>
Sent: ‎1/‎7/‎2015 11:58 PM
To: supervision_at_list.skarnet.org<mailto:supervision_at_list.skarnet.org>
Subject: Re: thoughts on rudimentary dependency handling

On Wed, Jan 7, 2015 at 6:53 PM, Laurent Bercot <ska-supervision_at_skarnet.org>
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.
Received on Thu Jan 08 2015 - 09:24:25 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC