Created
May 28, 2012 09:59
-
-
Save artyom/2818249 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MAKEFLAGS = -j -s | |
HOSTGROUP1 = host1 host2 host3 host4 | |
HOSTGROUP2 = host10 host11 host12 | |
default: | |
echo available targets: all, hostgroup1, hostgroup2 | |
all: $(HOSTGROUP1) $(HOSTGROUP2) | |
hostgroup1: $(HOSTGROUP1) | |
hostgroup2: $(HOSTGROUP2) | |
$(HOSTGROUP1) $(HOSTGROUP2): job | |
echo doing $@ | |
for script in $? ; \ | |
do ssh -A $@ sh -e < $$script 2>&1 >> [email protected] ; done | |
mv [email protected] $@ | |
.PHONY: clean all default hostgroup1 hostgroup2 | |
clean: | |
rm -f $(HOSTGROUP1) $(HOSTGROUP2) *.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment