X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-clone.sh;h=c09979a7a49e36b35e333b902cb0e0d689b693f4;hb=f8348be3be8493a62110a09ab0343213990b416b;hp=8e7150127aff222059f3549a8b7f647b8f792c7d;hpb=0879aa28708dcdfa255fff631781e5178755498e;p=git.git diff --git a/git-clone.sh b/git-clone.sh index 8e715012..c09979a7 100755 --- a/git-clone.sh +++ b/git-clone.sh @@ -9,7 +9,7 @@ unset CDPATH usage() { - echo >&2 "* git clone [-l [-s]] [-q] [-u ] [-n] " + echo >&2 "* git clone [-l [-s]] [-q] [-u ] [-n] []" exit 1 } @@ -98,7 +98,8 @@ 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') -mkdir "$dir" && +[ -e "$dir" ] && echo "$dir already exists." && usage +mkdir -p "$dir" && D=$( (cd "$dir" && git-init-db && pwd) ) &&