git: Make git-wrapper create links with -f.
[matthijs/servers/drsnuggles.git] / usr / local / bin / git-wrapper
index 5481ffbf42f89e29303a64954e3429b0e1efab0f..5a55eb7af92f42ca6c7d68ce0c1db5d6c2fe8056 100755 (executable)
 
 BASE_PATH='/data/vcs/git'
 HOOKS_PATH="$BASE_PATH/hooks"
-HOOKS=post-update
+HOOKS="post-update post-receive"
 
 function init_repos() {
        mkdir "$1" &> /dev/null  || return 1 
        (cd $1 && git --bare init &> /dev/null) || return 1
        for hook in $HOOKS; do
-           ln -s "$HOOKS_PATH/$hook" "$1/hooks/" || return 1
+           ln -s -f "$HOOKS_PATH/$hook" "$1/hooks/" || return 1
        done
 }