From: Barış Metin Date: Thu, 1 Jul 2010 14:53:42 +0000 (+0200) Subject: get the repository name from full path X-Git-Tag: foo~88^2~4 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=46ece905582860474990dd4a9eda345624a46fbe;p=infrastructure.git get the repository name from full path --- diff --git a/scripts/git-mirror.sh b/scripts/git-mirror.sh index bf552c8..83f8e8c 100755 --- a/scripts/git-mirror.sh +++ b/scripts/git-mirror.sh @@ -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}