From 0939b8b37601fbbd509f88f95f7cab30b906a383 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 4 Feb 2016 11:54:00 +0100 Subject: make deploy: properly print ssh target --- Makefile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 958629055..886a26f89 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,3 @@ -.ONESHELL: -.SHELLFLAGS := -eufc - ifndef system $(error unbound variable: system) endif @@ -22,7 +19,7 @@ execute = $(call evaluate,-A config.krebs.build.$(1) --json) | jq -r . | sh # usage: make deploy system=foo [target_host=bar] deploy: $(call execute,populate) - ssh "$$target_user@$$target_host" nixos-rebuild switch -I "$$target_path" + @set -x; ssh "$$target_user@$$target_host" nixos-rebuild switch -I "$$target_path" # usage: make LOGNAME=shared system=wolf eval.config.krebs.build.host.name eval eval.:;@$(call evaluate) @@ -33,7 +30,7 @@ eval.%:;@$(call evaluate,-A $*) #install: ssh = ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null #install:;@set -x # $(ssh) "$$target_user@$$target_host" \ -# env target_path=/var/src \ +# env target_path="$target_path" \ # sh -s prepare < krebs/4lib/infest/prepare.sh # make -s populate target_path=/mnt"$$target_path" # $(ssh) "$$target_user@$$target_host" \ -- cgit v1.2.3 From 8682f49ed7ba2687f65e8d11f1b943777896a228 Mon Sep 17 00:00:00 2001 From: tv Date: Thu, 4 Feb 2016 11:57:47 +0100 Subject: Makefile execute: don't try to run failed evaluations :D --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 886a26f89..e61d16b75 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,10 @@ evaluate = \ --show-trace \ $(1) -execute = $(call evaluate,-A config.krebs.build.$(1) --json) | jq -r . | sh +execute = \ + result=$$($(call evaluate,-A config.krebs.build.$(1) --json)) && \ + script=$$(echo "$$result" | jq -r .) && \ + echo "$$script" | sh # usage: make deploy system=foo [target_host=bar] deploy: -- cgit v1.2.3