get the repository name from full path
[infrastructure.git] / 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}