Added install target to Makefile
This commit is contained in:
parent
de18ca60ab
commit
8c7114f2a3
1 changed files with 9 additions and 4 deletions
13
Makefile
13
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 || ( \
|
||||
|
|
Loading…
Add table
Reference in a new issue