X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=git-clone.sh;h=ded40856c53cd03e1f6f72736c41592b7a2452e5;hb=2c620a1ad1dce1e249d66ce18c7b1cce22d5d64c;hp=168eb963ba7a611860e6272bf419f09e8ff33929;hpb=8a1a120c55a67c3193e136a06826585711717399;p=git.git diff --git a/git-clone.sh b/git-clone.sh index 168eb963..ded40856 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -99,7 +99,7 @@ fi dir="$2" # Try using "humanish" part of source repo if user didn't specify one -[ -z "$dir" ] && dir=$(echo "$repo" | sed -e 's|/$||' -e 's|:*/*\.git$||' -e 's|.*/||g') +[ -z "$dir" ] && dir=$(echo "$repo" | sed -e 's|/$||' -e 's|:*/*\.git$||' -e 's|.*[/:]||g') [ -e "$dir" ] && echo "$dir already exists." && usage mkdir -p "$dir" && D=$(cd "$dir" && pwd) &&