summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2017-07-23 22:48:58 +0200
committertv <tv@krebsco.de>2017-07-25 12:36:00 +0200
commita5042a6cebc7b367fa9ae0ad1a218c78ca0d13f5 (patch)
treea22398a43d36313869e094e0b04f2ef72ad72942
parent4c40b59c48289540d68df5cece494cbad14b8daa (diff)
Makefile: reimplement install using shell
-rw-r--r--Makefile15
1 files changed, 2 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index 4258d91..7b62212 100644
--- a/Makefile
+++ b/Makefile
@@ -84,8 +84,9 @@ $(error No goals specified)
endif
# usage: make deploy system=foo [target=bar]
+# usage: make install system=foo target=bar
# usage: make test system=foo target=bar
-deploy test:
+deploy install test:
ifdef target
nix-shell --run '$@ --system=$(system) --target=$(target)'
else
@@ -112,15 +113,3 @@ pkgs.%:;@$(call build,$@)
# usage: make LOGNAME=krebs system=wolf eval.config.krebs.build.host.name
eval eval.:;@$(call evaluate,$${expr-eval})
eval.%:;@$(call evaluate,$@)
-
-# usage: make install system=foo [target_host=bar]
-install: ssh ?= ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
-install:
- $(ssh) $(target_user)@$(target_host) -p $(target_port) \
- env target_path=$(target_path) \
- sh -s prepare < krebs/4lib/infest/prepare.sh
- $(MAKE) populate target_path=/mnt$(target_path)
- $(ssh) $(target_user)@$(target_host) -p $(target_port) \
- env NIXOS_CONFIG=$(target_path)/nixos-config \
- STOCKHOLM_VERSION="$$STOCKHOLM_VERSION" \
- nixos-install