diff --git a/Makefile b/Makefile index b59d825..4e26f8b 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,17 @@ -MODULES = $(shell find */manifests/init.pp | sed -e 's/^\([^\/]*\).*/\1/') -MANIFESTS = $(shell find . -name \*.pp) +MODULES := $(shell find */manifests/init.pp | sed -e 's/^\([^\/]*\).*/\1/') +MANIFESTS := $(shell find . -name \*.pp) +MODULESDIR := /etc/puppet/modules-$(shell date +%Y-%m-%d) +TARFLAGS = --owner=root --group=root --mode g-w,o=g --exclude=.git --exclude=rdoc all: puppet-modules.tar.gz puppet-modules.tar.gz: $(MODULES) LICENSE CREDITS Makefile.inc - umask 022 ; tar zcvf $@ --owner=root --group=root \ - --mode g-w,o=g --exclude=.git --exclude=rdoc $^ + umask 022 ; tar zcvf $@ $(TARFLAGS) $^ + +install: $(MODULES) LICENSE CREDITS Makefile.inc + @umask 022 ; mkdir -p $(MODULESDIR) && \ + tar cf - $(TARFLAGS) $^ | tar xvf - -C $(MODULESDIR) check: @which puppet > /dev/null 2>&1 || ( \