From: Michael Hanselmann Date: Tue, 27 Oct 2009 14:24:46 +0000 (+0100) Subject: Makefile.am: Add more checks to distcheck-hook X-Git-Tag: v2.1.0rc0~74 X-Git-Url: https://code.grnet.gr/git/ganeti-local/commitdiff_plain/c6aa0c4241ab80bc6e8339c516b7ce85277d4fb0 Makefile.am: Add more checks to distcheck-hook Also use grep only to convert find's output to an exit status. Signed-off-by: Michael Hanselmann Reviewed-by: Iustin Pop --- diff --git a/Makefile.am b/Makefile.am index 1ceaa41..cbfa69c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -451,8 +451,16 @@ check-local: # a dist hook rule for catching revision control directories distcheck-hook: - if find $(top_distdir) | grep -F -e '.svn' -e '.git'; then \ - echo "Found revision control files in final archive" 1>&2 ; \ + if find $(top_distdir) -name .svn -or -name .git | grep .; then \ + echo "Found revision control files in final archive." 1>&2; \ + exit 1; \ + fi + if find $(top_distdir) -name '*.py[co]' | grep .; then \ + echo "Found Python byte code in final archive." 1>&2; \ + exit 1; \ + fi + if find $(top_distdir) -name '*~' | grep .; then \ + echo "Found backup files in final archive." 1>&2; \ exit 1; \ fi