From 42ec9addb72f9a1c3f0b37e66445fa0c251951b9 Mon Sep 17 00:00:00 2001 From: Charlie Date: Thu, 29 Oct 2009 17:58:37 -0600 Subject: Make simple links for git access without the .git extension --- install-repos | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install-repos b/install-repos index 82518f2..148ae9d 100755 --- a/install-repos +++ b/install-repos @@ -1,7 +1,8 @@ #!/bin/sh -eu set -eu -REPOS="/data/git/*.git" +DIR="/data/git" +REPOS="$DIR/*.git" HOOKS="pre-receive" dir=`dirname $0` BASE=`realpath $dir` @@ -10,8 +11,11 @@ for hook in $HOOKS; do for git in $REPOS; do if [ -d "$git" ]; then cd $git - echo `basename $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 ln -sf $BASE/$hook hooks/$hook -- cgit v1.2.3