[Bug 789596] gstreamer build fails if .git isn't in the expected place

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Jan 19 17:58:54 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=789596

--- Comment #3 from Tim-Philipp Müller <t.i.m at zen.co.uk> ---
Created attachment 367095
  --> https://bugzilla.gnome.org/attachment.cgi?id=367095&action=edit
autogen.sh.in: fix pre-commit hook install if autogen lives in a subdir (for
common submodule)

Could you check if this works right for you in autogen.sh (The patch won't be
useful to you since it only modifies the template file for autogen.sh):

# Install GNU indent-based pre-commit hook for doing clean commits that
# maintain the GStreamer coding style.
#
# Don't assume this autogen.sh or the common  module is at the top-level
# of the git checkout, it might be a unified git repo with the gstreamer
# code living in a subdirectory within the git repository.
if git --version 2>/dev/null >/dev/null; then
  gitdir=`git rev-parse --git-dir`
  curprefix=`git rev-parse --show-prefix` # will have trailing slash
  if test ! \( -x "$gitdir/hooks/pre-commit" -a -L "$gitdir/hooks/pre-commit"
\);
  then
    rm -f "$gitdir/hooks/pre-commit"
    if ! ln -s "../../$curprefix""common/hooks/pre-commit.hook"
"$gitdir/hooks/pre-commit" 2> /dev/null
    then
        echo "Failed to create commit hook symlink, copying instead ..."
        cp "../../$curprefix""common/hooks/pre-commit.hook"
"$gitdir/hooks/pre-commit"
    fi
  fi
fi

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list