summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-02-19 16:29:21 +0100
committertv <tv@krebsco.de>2016-02-19 16:29:21 +0100
commitda5b3a4b05ef822cc41d36b6cc2071a2e78506d4 (patch)
treef2b8fe1507b1901f9b1196323a46571946466049
parentea8b76569c6b226fe148e559477669b095408472 (diff)
use stockholm's make eval expr= interfaceHEAD1.1.2ni/mastercd/mastercd/HEADmaster
-rwxr-xr-xpush8
1 files changed, 7 insertions, 1 deletions
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() {