sequencer: refactor sequencer_add_exec_commands() to work on a todo_list
[gitweb.git] / wrap-for-bin.sh
index 5842408817aa7e5c584f244a7625cf458882d568..95851b85b6b7181130f0cd441c2bd7ac0bfb89da 100644 (file)
@@ -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