summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6dc78e6)
raw | patch | inline | side by side (parent: 6dc78e6)
author | Alex Riesen <raa.lkml@gmail.com> | |
Thu, 23 Feb 2006 11:25:20 +0000 (12:25 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 23 Feb 2006 11:47:15 +0000 (03:47 -0800) |
In windows you cannot remove current or opened directory,
an opened file, a running program, a loaded library, etc...
[jc: signoffs? With a minor quoting fix.]
Signed-off-by: Junio C Hamano <junkio@cox.net>
an opened file, a running program, a loaded library, etc...
[jc: signoffs? With a minor quoting fix.]
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-clone.sh | patch | blob | history |
diff --git a/git-clone.sh b/git-clone.sh
index d184ceb7a6f2a7d4ffc3a002b1a8846c46297f33..be471d82b8f3d15407b599dcd5e89a7669502ff4 100755 (executable)
--- a/git-clone.sh
+++ b/git-clone.sh
[ -e "$dir" ] && echo "$dir already exists." && usage
mkdir -p "$dir" &&
D=$(cd "$dir" && pwd) &&
-trap 'err=$?; rm -r $D; exit $err' exit
+trap 'err=$?; cd ..; rm -r "$D"; exit $err' exit
case "$bare" in
yes) GIT_DIR="$D" ;;
*) GIT_DIR="$D/.git" ;;