summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-02-12 19:56:04 +0100
committertv <tv@krebsco.de>2016-02-12 19:56:04 +0100
commit1497ee718256ff48c65ebcb0ddea633c6628eb69 (patch)
treef240e3ff3586cbc5d42f9075d87f0722901ccb76 /Makefile
parentd954dd5e192834a72a2d05b428fc0e8cef599c31 (diff)
Makefile: enable "make install"
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 10 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index 9ed045e4..f39ed0c0 100644
--- a/Makefile
+++ b/Makefile
@@ -28,14 +28,13 @@ deploy:
eval eval.:;@$(call evaluate)
eval.%:;@$(call evaluate,-A $*)
-## usage: make install system=foo target=
-#.PHONY: install
-#install: ssh = ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
-#install:;@set -x
-# $(ssh) "$$target_user@$$target_host" \
-# 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" \
-# env NIXOS_CONFIG=/var/src/nixos-config \
-# nixos-install
+# usage: make install system=foo [target_host=bar]
+install: ssh = ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
+install:
+ $(ssh) $(target_user)@$(target_host) \
+ env target_path=$(target_path) \
+ sh -s prepare < krebs/4lib/infest/prepare.sh
+ target_path=/mnt$(target_path) $(call execute,populate)
+ $(ssh) $(target_user)@$(target_host) \
+ env NIXOS_CONFIG=$(target_path)/nixos-config \
+ nixos-install