From: Michael Stapelberg Date: Mon, 7 Nov 2016 19:49:26 +0000 (-0800) Subject: configure: add build directory to gitignore (#2543) X-Git-Tag: 4.13~6 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=841118e5f8b2456d61bbf3d0e65094fac3c935cc;p=i3%2Fi3 configure: add build directory to gitignore (#2543) --- diff --git a/configure.ac b/configure.ac index 8829fed9..9e61d997 100644 --- a/configure.ac +++ b/configure.ac @@ -146,6 +146,15 @@ else print_BUILD_MANS=no fi +git_dir=`git rev-parse --git-dir 2>/dev/null` +if test -n "$git_dir"; then + srcdir=`dirname "$git_dir"` + exclude_dir=`pwd | sed "s,^$srcdir,,g"` + if ! grep -q "^$exclude_dir" "$git_dir/info/exclude"; then + echo "$exclude_dir" >> "$git_dir/info/exclude" + fi +fi + echo \ "-------------------------------------------------------------------------------- build configured: