projects
/
matthijs
/
servers
/
drsnuggles.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d67b176
)
git: Add a post-update hook for new repositories.
author
Matthijs Kooijman
<matthijs@stdin.nl>
Thu, 13 Aug 2009 09:50:59 +0000
(11:50 +0200)
committer
Matthijs Kooijman
<matthijs@stdin.nl>
Thu, 13 Aug 2009 09:50:59 +0000
(11:50 +0200)
usr/local/bin/git-wrapper
patch
|
blob
|
history
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'
+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
+ cp -P "$POST_UPDATE_HOOK" "$1/hooks/" || return 1
}
# We keep an array of arguments, so we can handle quoting an spaces in