summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: babfaf8)
raw | patch | inline | side by side (parent: babfaf8)
author | Carl Worth <cworth@cworth.org> | |
Fri, 17 Feb 2006 21:33:24 +0000 (13:33 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 18 Feb 2006 00:16:49 +0000 (16:16 -0800) |
Signed-off-by: Carl Worth <cworth@cworth.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
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 e192b08c0dc3ab410e371fe07af96b9b5b59f22a..d184ceb7a6f2a7d4ffc3a002b1a8846c46297f33 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
case "$bare" in
yes) GIT_DIR="$D" ;;
*) GIT_DIR="$D/.git" ;;
git checkout
esac
fi
+
+trap - exit
+