Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: aa43019f02
Fetching contributors…

Cannot retrieve contributors at this time

executable file 22 lines (18 sloc) 0.621 kB
#! /bin/bash
repo="$1"
post_receive_hook_script="$(dirname $0)/pushand_post-receive_hook"
if [[ ! -d "$repo" ]]; then
go_back="$(pwd)"
mkdir -pv "$repo" > /dev/null
cd "$repo"
git init > /dev/null
# remove .git/hooks/post-receive if it exists (which it will in certain git versions)
if [[ -f .git/hooks/post-receive ]]; then
rm .git/hooks/post-receive
fi
ln -s $post_receive_hook_script .git/hooks/post-receive > /dev/null
cd "$go_back"
fi
# make the real call to the real git-receive-pack
# TODO make this dynamic! using the pushand_server_variables
/usr/bin/git-receive-pack_original/git-receive-pack $*
Jump to Line
Something went wrong with that request. Please try again.