summaryrefslogtreecommitdiff
path: root/wrap-for-bin.sh
diff options
context:
space:
mode:
Diffstat (limited to 'wrap-for-bin.sh')
-rw-r--r--wrap-for-bin.sh19
1 files changed, 13 insertions, 6 deletions
diff --git a/wrap-for-bin.sh b/wrap-for-bin.sh
index 5842408817..95851b85b6 100644
--- a/wrap-for-bin.sh
+++ b/wrap-for-bin.sh
@@ -20,10 +20,17 @@ PATH='@@BUILD_DIR@@/bin-wrappers:'"$PATH"
export GIT_EXEC_PATH GITPERLLIB PATH GIT_TEXTDOMAINDIR
-if test -n "$GIT_TEST_GDB"
-then
- unset GIT_TEST_GDB
- exec gdb --args "${GIT_EXEC_PATH}/@@PROG@@" "$@"
-else
+case "$GIT_DEBUGGER" in
+'')
exec "${GIT_EXEC_PATH}/@@PROG@@" "$@"
-fi
+ ;;
+1)
+ unset GIT_DEBUGGER
+ exec gdb --args "${GIT_EXEC_PATH}/@@PROG@@" "$@"
+ ;;
+*)
+ GIT_DEBUGGER_ARGS="$GIT_DEBUGGER"
+ unset GIT_DEBUGGER
+ exec ${GIT_DEBUGGER_ARGS} "${GIT_EXEC_PATH}/@@PROG@@" "$@"
+ ;;
+esac