get the repository name from full path
authorBarış Metin <Talip-Baris.Metin@sophia.inria.fr>
Thu, 1 Jul 2010 14:53:42 +0000 (16:53 +0200)
committerBarış Metin <Talip-Baris.Metin@sophia.inria.fr>
Thu, 1 Jul 2010 14:53:42 +0000 (16:53 +0200)
scripts/git-mirror.sh

index bf552c8..83f8e8c 100755 (executable)
@@ -34,6 +34,8 @@ function run () {
 
 function mirror () {
     for arg in "$@" ; do
+        arg=$(basename $arg | sed s/.git$//g)
+
         NAME=$(echo ${arg} | sed 's/\/$//')
         GIT_NAME=${NAME}.git
         REPO_DIR=${LOCAL_MIRROR_DIR}/${NAME}