fix auto exclude in-work-tree build dirs
updates: -- configure: add build directory to gitignore #2543 -- https://github.com/i3/i3/pull/2543
This commit is contained in:
parent
9cb5df42d2
commit
934b23fa52
|
@ -154,8 +154,9 @@ else
|
||||||
print_BUILD_MANS=no
|
print_BUILD_MANS=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git_dir=`git rev-parse --git-dir 2>/dev/null`
|
in_git_worktree=`git rev-parse --is-inside-work-tree 2>/dev/null`
|
||||||
if test -n "$git_dir"; then
|
if "$in_git_worktree" == "true"; then
|
||||||
|
git_dir=`git rev-parse --git-dir 2>/dev/null`
|
||||||
srcdir=`dirname "$git_dir"`
|
srcdir=`dirname "$git_dir"`
|
||||||
exclude_dir=`pwd | sed "s,^$srcdir,,g"`
|
exclude_dir=`pwd | sed "s,^$srcdir,,g"`
|
||||||
if ! grep -q "^$exclude_dir" "$git_dir/info/exclude"; then
|
if ! grep -q "^$exclude_dir" "$git_dir/info/exclude"; then
|
||||||
|
|
Loading…
Reference in New Issue