27 lines
932 B
Bash
Executable File
27 lines
932 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Standard GNOME post-receive hook.
|
|
#
|
|
# The "post-receive" script is run after receive-pack has accepted a pack
|
|
# and the repository has been updated. It is passed arguments in through
|
|
# stdin in the form
|
|
# <oldrev> <newrev> <refname>
|
|
# For example:
|
|
# aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master
|
|
#
|
|
# git-config options affecting the operation of this script:
|
|
# hook.emailprefix - should always be empty
|
|
# hooks.mailinglist - should always be svn-commits-list@gnome.org
|
|
|
|
BINDIR=/usr/local/bin/git-bin
|
|
|
|
# If the committing user has a homedir with a .gitconfig in it, it we
|
|
# don't want that to affect our operation. (Should this just be handled
|
|
# in run-git-or-special-cmd?)
|
|
GIT_DIR=$(git rev-parse --git-dir 2>/dev/null)
|
|
GIT_CONFIG="${GIT_DIR}/config"
|
|
export GIT_CONFIG
|
|
|
|
tee >($BINDIR/post-receive-notify-updates 1>&2) \
|
|
| $BINDIR/post-receive-email 1>&2
|