21 lines
No EOL
723 B
Makefile
21 lines
No EOL
723 B
Makefile
|
|
MODULES = $(shell find . -maxdepth 1 -mindepth 1 -type d)
|
|
|
|
all: puppet-modules.tar.gz
|
|
|
|
puppet-modules.tar.gz: $(MODULES)
|
|
umask 022 ; tar zcvf $@ --owner=root --group=root \
|
|
--mode g-w,o=g --exclude=.git $^
|
|
|
|
check:
|
|
@which puppet > /dev/null 2>&1 || ( \
|
|
echo "puppet not installed, cannot perform syntax checking" \
|
|
1>&2 ; exit 1 )
|
|
@for name in `git diff --name-only`; do \
|
|
echo $${name} | egrep '\.pp$$' > /dev/null || continue ; \
|
|
errors="`puppet --color=false --parseonly --ignoreimport $${name}`" ; \
|
|
[ $$? -eq 0 ] || echo "$${errors}" 1>&2 ; \
|
|
errors="`egrep --line-number '[[:space:]]$$' $${name}`" ; \
|
|
[ $$? -eq 0 ] && echo "$${name}: trailing white spaces on" \
|
|
"line $${errors}" 1>&2 ; \
|
|
done
|