From 4a46bf92e6306458ed0cfc375c71618c648ac85a Mon Sep 17 00:00:00 2001 From: Charlie Date: Wed, 28 Oct 2009 12:38:08 -0600 Subject: Initial commit --- install-repos | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 install-repos (limited to 'install-repos') diff --git a/install-repos b/install-repos new file mode 100755 index 0000000..ae10f44 --- /dev/null +++ b/install-repos @@ -0,0 +1,23 @@ +#!/bin/sh -eu +set -eu + +REPOS="/data/git/*.git" +HOOKS="pre-receive" +dir=`dirname $0` +BASE=`realpath $dir` + +for hook in $HOOKS; do + for git in $REPOS; do + if [ -d "$git" ]; then + cd $git + echo `basename $git` + chown -R www:www . + find . -type f -print0 | xargs -0 chmod 660 + find . -type d -print0 | xargs -0 chmod 770 + ln -sf $BASE/$hook hooks/$hook + git config core.sharedRepository=0660 || true + touch git-daemon-export-ok + fi + done +done + -- cgit v1.2.3