summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 17 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 05780f80e..552e6e0fd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,9 @@
#
# usage:
-# make system=foo
-# make systems='foo bar'
-# make eval system=foo get=config.networking.extraHosts [filter=json]
+# make infest system=foo [target=bar]
+# make [deploy] system=foo [target=bar]
+# make [deploy] systems='foo bar'
+# make eval get=tv.wu.config.time.timeZone [filter=json]
#
.ONESHELL:
@@ -10,20 +11,20 @@
ifdef systems
$(systems):
+ @
+ unset target
parallel \
--line-buffer \
-j0 \
--no-notice \
--tagstring {} \
- -q make systems= system={} ::: $(systems)
+ -q make -s systems= system={} ::: $(systems)
else ifdef system
-.PHONY: deploy
-deploy:;@
- make -s eval system=$(system) get=config.krebs.build.script filter=json | sh
-
-.PHONY: infest
-infest:;@
- make -s eval system=$(system) get=config.krebs.build.infest filter=json | sh
+.PHONY: deploy infest
+deploy infest:;@
+ export get=krebs.$@
+ export filter=json
+ make -s eval | sh
.PHONY: eval
eval:
@@ -40,8 +41,11 @@ endif
--eval \
-A "$$get" \
'<stockholm>' \
- --argstr user-name "$$LOGNAME" \
- --argstr system-name "$$system" \
+ --argstr current-date "$$(date -Is)" \
+ --argstr current-host-name "$$HOSTNAME" \
+ --argstr current-user-name "$$LOGNAME" \
+ $${system+--argstr system "$$system"} \
+ $${target+--argstr target "$$target"} \
| filter
else
$(error unbound variable: system[s])