summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e300846)
raw | patch | inline | side by side (parent: e300846)
author | Yakov Lerner <iler.ml@gmail.com> | |
Mon, 22 May 2006 19:34:00 +0000 (22:34 +0300) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 23 May 2006 01:11:52 +0000 (18:11 -0700) |
Problem: 'trap...exit' causes error message when /bin/sh is ash.
Fix: Change 'trap...exit' to 'trap...0' like in other scripts.
Signed-off-by: Yakov Lerner <iler.ml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Fix: Change 'trap...exit' to 'trap...0' like in other scripts.
Signed-off-by: Yakov Lerner <iler.ml@gmail.com>
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 227245c865e3f33e3b795868c484a41d590c553a..d96894d4c2aa6e6c0aa38ca0755ffa16ace2161c 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=$?; cd ..; rm -r "$D"; exit $err' exit
+trap 'err=$?; cd ..; rm -r "$D"; exit $err' 0
case "$bare" in
yes) GIT_DIR="$D" ;;
*) GIT_DIR="$D/.git" ;;
fi
rm -f "$GIT_DIR/CLONE_HEAD" "$GIT_DIR/REMOTE_HEAD"
-trap - exit
+trap - 0