From da5b3a4b05ef822cc41d36b6cc2071a2e78506d4 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 19 Feb 2016 16:29:21 +0100 Subject: use stockholm's make eval expr= interface --- push | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/push b/push index 8041472..1ee11eb 100755 --- a/push +++ b/push @@ -16,7 +16,13 @@ set -efu STOCKHOLM=${STOCKHOLM-$HOME/stockholm} my_hosts() { - (cd "$STOCKHOLM" && get "users.$LOGNAME" -l | jq -R -s -c 'split("\n")') + make -s -C "$STOCKHOLM" system=$HOSTNAME eval expr=' + with config.krebs.lib; + let my-name = maybeEnv "LOGNAME" (abort "LOGNAME not set"); in + toJSON (attrNames (filterAttrs (_: host: host.owner.name == my-name) + config.krebs.hosts)) + ' \ + | jq -r . } all_push_hosts() { -- cgit v1.2.3