Merge branch 'master' of ssh://git.onelab.eu/git/infrastructure
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Sat, 22 May 2010 19:31:27 +0000 (21:31 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Sat, 22 May 2010 19:31:27 +0000 (21:31 +0200)
scripts/git-clone.sh

index e6581fb..5096764 100755 (executable)
@@ -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
 }