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/')
|
MODULES := $(shell find */manifests/init.pp | sed -e 's/^\([^\/]*\).*/\1/')
|
||||||
MANIFESTS = $(shell find . -name \*.pp)
|
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
|
all: puppet-modules.tar.gz
|
||||||
|
|
||||||
puppet-modules.tar.gz: $(MODULES) LICENSE CREDITS Makefile.inc
|
puppet-modules.tar.gz: $(MODULES) LICENSE CREDITS Makefile.inc
|
||||||
umask 022 ; tar zcvf $@ --owner=root --group=root \
|
umask 022 ; tar zcvf $@ $(TARFLAGS) $^
|
||||||
--mode g-w,o=g --exclude=.git --exclude=rdoc $^
|
|
||||||
|
install: $(MODULES) LICENSE CREDITS Makefile.inc
|
||||||
|
@umask 022 ; mkdir -p $(MODULESDIR) && \
|
||||||
|
tar cf - $(TARFLAGS) $^ | tar xvf - -C $(MODULESDIR)
|
||||||
|
|
||||||
check:
|
check:
|
||||||
@which puppet > /dev/null 2>&1 || ( \
|
@which puppet > /dev/null 2>&1 || ( \
|
||||||
|
|
Loading…
Add table
Reference in a new issue