git://git.onelab.eu
/
infrastructure.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a1d452c
)
mv module/.git to module.git and configure repository for git daemon
author
Baris Metin
<baris@zanzibar.local>
Sat, 22 May 2010 12:44:56 +0000
(14:44 +0200)
committer
Baris Metin
<baris@zanzibar.local>
Sat, 22 May 2010 12:44:56 +0000
(14:44 +0200)
scripts/git-clone.sh
patch
|
blob
|
history
diff --git
a/scripts/git-clone.sh
b/scripts/git-clone.sh
index
e6581fb
..
5096764
100755
(executable)
--- 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}
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
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
}
done
}