diff options
author | tv <tv@shackspace.de> | 2015-07-09 23:34:22 +0200 |
---|---|---|
committer | tv <tv@shackspace.de> | 2015-07-10 00:02:06 +0200 |
commit | cf7f07c75ff0f41dd97246e882ae0d30eec42efb (patch) | |
tree | 4612b4c8b8968eeb6913e0f2d0c356c97057ebd6 | |
parent | 09e435644334e7afcb974351d53df16ecd74bb95 (diff) |
make deploy: init
-rw-r--r-- | Makefile | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..cab9f8079 --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +all: deploy + +tv-cluster := cd mkdir nomic rmdir wu +deploy-cd:; ./deploy cd +deploy-mkdir:; ./deploy mkdir +deploy-nomic:; ./deploy nomic root@nomic-local +deploy-rmdir:; ./deploy rmdir +deploy-wu:; ./deploy wu root@localhost + +ifndef cluster +cluster := $(LOGNAME) +endif +hosts := $($(cluster)-cluster) +ifeq ($(hosts),) +$(error bad cluster: $(cluster)) +else +.PHONY: deploy $(addprefix deploy-,$(hosts)) +deploy: + exec parallel \ + -j 0 \ + --no-notice \ + --rpl '{u} s/^.* deploy-(.*)/\1/' \ + --tagstring '{u}' \ + --line-buffer \ + $(MAKE) deploy-{} ::: $(hosts) +endif |