From: Richard Levitte Date: Thu, 17 Aug 2017 07:38:02 +0000 (+0200) Subject: When building a tarball, avoid trying to copy submodules X-Git-Tag: OpenSSL_1_1_1-pre1~829 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5b7b0115256c4d0be0f92468df14bdf1c57634a5;p=oweals%2Fopenssl.git When building a tarball, avoid trying to copy submodules submodules are directories that we don't want in our tarballs, so avoid them. Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/4178) --- diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 7923661383..0603b4144d 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -686,8 +686,11 @@ tar: DISTDIR=$(NAME); \ mkdir -p $$TMPDIR/$$DISTDIR; \ (cd $(SRCDIR); \ + excl_re=`git submodule status | sed -e 's/^.//' | cut -d' ' -f2`; \ + excl_re="^(fuzz/corpora|`echo $$excl_re | sed -e 's/ /$$|/g'`\$$)"; \ + echo "$$excl_re"; \ git ls-tree -r --name-only --full-tree HEAD \ - | grep -v '^fuzz/corpora' \ + | grep -v -E "$$excl_re" \ | while read F; do \ mkdir -p $$TMPDIR/$$DISTDIR/`dirname $$F`; \ cp $$F $$TMPDIR/$$DISTDIR/$$F; \