aboutsummaryrefslogtreecommitdiff
path: root/git-clone.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-clone.sh')
-rwxr-xr-xgit-clone.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-clone.sh b/git-clone.sh
index 8e7150127..f99e0adf8 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -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)
) &&