projects
/
matthijs
/
servers
/
drsnuggles.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
git: Add a post-update hook for new repositories.
[matthijs/servers/drsnuggles.git]
/
usr
/
local
/
bin
/
git-wrapper
diff --git
a/usr/local/bin/git-wrapper
b/usr/local/bin/git-wrapper
index 1920599af45e46adb61b37b7f83e9126804be48c..6896ec8904e6dfe0677522564effdbb36a1868c7 100755
(executable)
--- a/
usr/local/bin/git-wrapper
+++ b/
usr/local/bin/git-wrapper
@@
-9,10
+9,12
@@
# --base-path-relaxed.
BASE_PATH='/data/vcs/git'
# --base-path-relaxed.
BASE_PATH='/data/vcs/git'
+POST_UPDATE_HOOK="$BASE_PATH/hooks/post-update"
function init_repos() {
mkdir "$1" &> /dev/null || return 1
(cd $1 && git --bare init &> /dev/null) || return 1
function init_repos() {
mkdir "$1" &> /dev/null || return 1
(cd $1 && git --bare init &> /dev/null) || return 1
+ cp -P "$POST_UPDATE_HOOK" "$1/hooks/" || return 1
}
# We keep an array of arguments, so we can handle quoting an spaces in
}
# We keep an array of arguments, so we can handle quoting an spaces in