diff options
-rwxr-xr-x | git/new | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -0,0 +1,14 @@ +#!/bin/sh +set -e + +[ -z "$1" ] && { echo usage: $0 name 1>&2; exit 1; } + +# create new repository +name=${1%.git} +git init --shared=group --bare /git/"$name" +chown -R git:git /git/"$name" +cp /git/"$name"/hooks/post-update.sample /git/"$name"/hooks/post-update +cd /git/"$name" +git update-server-info +sed -i '/receive\|denyNonFast/d' /git/"$name"/config +${EDITOR:-vi} /git/"$name"/description |