From 58bdb6c237eb49186645d3afeb56875e50aaa02e Mon Sep 17 00:00:00 2001 From: Baris Metin Date: Sat, 22 May 2010 14:44:56 +0200 Subject: [PATCH] mv module/.git to module.git and configure repository for git daemon --- scripts/git-clone.sh | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/scripts/git-clone.sh b/scripts/git-clone.sh index e6581fb..5096764 100755 --- a/scripts/git-clone.sh +++ b/scripts/git-clone.sh @@ -14,20 +14,28 @@ function clone () { SVN_MODULE=$(basename $arg) echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx converting module $SVN_MODULE in $(pwd)" SVN_PATH=${SVNROOT}/${SVN_MODULE} - GIT_REPO=$(echo $SVN_MODULE | sed 's/.*/\L&/') - -# rm -rf $TMPDIR -# mkdir -p $TMPDIR -# pushd $TMPDIR -# git svn init -s $SVN_PATH --no-metadata -# git svn fetch -# popd - - rm -rf $GIT_REPO - mkdir -p $GIT_REPO - pushd $GIT_REPO + GIT_WORKDIR=$(echo $SVN_MODULE | sed 's/.*/\L&/') + GIT_REPO=${GIT_WORKDIR}.git + + rm -rf $GIT_WORKDIR + rm -rf $GIT_REPO + + mkdir -p $GIT_WORKDIR + pushd $GIT_WORKDIR svn2git $SVN_PATH popd + + mv ${GIT_WORKDIR}/.git ${GIT_REPO} + rm -rf ${GIT_WORKDIR} + + pushd $GIT_REPO + # enable clone with git:// protocol + # git-config daemon.uploadpack true + + # enable archive with git:// procotol + git-config daemon.uploadarchive true + popd + done } -- 2.43.0