summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharlie <root@dev.ws.local>2009-10-29 18:00:36 -0600
committerCharlie <root@dev.ws.local>2009-10-29 18:00:36 -0600
commit880e0039c189c5b8266739b29a07f92d6c4e1d4c (patch)
tree7c54481200d307771ce92d2cb7e379c367451862
parent42ec9addb72f9a1c3f0b37e66445fa0c251951b9 (diff)
Rework how install-repos works
-rwxr-xr-xinstall-repos38
1 files changed, 22 insertions, 16 deletions
diff --git a/install-repos b/install-repos
index 148ae9d..92d7dbe 100755
--- a/install-repos
+++ b/install-repos
@@ -7,22 +7,28 @@ 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
- name=`basename $git`
- simple=${name%.git}
- echo $name
- chown -R www:www .
- ln -sf $git $DIR/$simple
- find . -type f -print0 | xargs -0 chmod 660
- find . -type d -print0 | xargs -0 chmod 770
+for git in $REPOS; do
+ if [ -d "$git" ]; then
+ cd $git
+ name=`basename $git`
+ simple=${name%.git}
+ echo $name
+
+ # Prepare the repository
+ chown -R www:www .
+ ln -sf $git $DIR/$simple
+ find . -type f -print0 | xargs -0 chmod 660
+ find . -type d -print0 | xargs -0 chmod 770
+
+ # Install hooks
+ for hook in $HOOKS; do
ln -sf $BASE/$hook hooks/$hook
- git config core.sharedRepository=0660 || true
- git config receive.denyNonFastforwards=true || true
- touch git-daemon-export-ok
- fi
- done
+ done
+
+ # Repository settings
+ git config core.sharedRepository=0660 || true
+ git config receive.denyNonFastforwards=true || true
+ touch git-daemon-export-ok
+ fi
done