Commit b0b1817f authored by Vivien Kraus's avatar Vivien Kraus
Browse files

Delete $tmpdir

parent b19c8803
......@@ -60,6 +60,7 @@ dist_noinst_SCRIPTS = bootstrap.sh
EXTRA_DIST = $(srcdir)/indent.stamp .gitignore \
$(srcdir)/hooks/pre-commit.sh
$(srcdir)/indent.stamp: $(INDENTED_FILES)
if HAVE_INDENT
(cd $(srcdir) && $(INDENT) -gnu $(INDENTED_FILES))
......
......@@ -2,12 +2,15 @@
# https://stackoverflow.com/questions/12320220/testing-what-is-about-to-be-committed-in-a-pre-commit-hook
tmpdir=$(mktemp -d) # Or put it wherever you like
git archive HEAD | tar -xf - -C "$tmpdir"
git diff --staged | patch -p1 -d "$tmpdir"
cd "$tmpdir"
git archive HEAD | tar -xf - -C "$tmpdir" || exit 1
git diff --staged | patch -p1 -d "$tmpdir" || exit 1
cd "$tmpdir" || exit 1
autoreconf --warnings=all --warnings=error --install || exit 1
./configure \
--enable-indent\
CPPFLAGS="-Wall -Wextra -Werror -g -O0" || exit 1
make -j 16 distcheck
make -j 16 distcheck || exit 1
cd / || exit 1
rm -r "$tmpdir" || exit 1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment