submodule: use prepare_submodule_repo_env consistently
[gitweb.git] / wrap-for-bin.sh
index 53a8dd0a3f9a123eae16415d6bcd50b1fbcba6a4..db0ec6a7370fd56e4e11c49a4b9e5e15f461e1f9 100644 (file)
@@ -14,9 +14,15 @@ else
        GIT_TEMPLATE_DIR='@@BUILD_DIR@@/templates/blt'
        export GIT_TEMPLATE_DIR
 fi
-GITPERLLIB='@@BUILD_DIR@@/perl/blib/lib'
+GITPERLLIB='@@BUILD_DIR@@/perl/blib/lib'"${GITPERLLIB:+:$GITPERLLIB}"
 GIT_TEXTDOMAINDIR='@@BUILD_DIR@@/po/build/locale'
 PATH='@@BUILD_DIR@@/bin-wrappers:'"$PATH"
 export GIT_EXEC_PATH GITPERLLIB PATH GIT_TEXTDOMAINDIR
 
-exec "${GIT_EXEC_PATH}/@@PROG@@" "$@"
+if test -n "$GIT_TEST_GDB"
+then
+       unset GIT_TEST_GDB
+       exec gdb --args "${GIT_EXEC_PATH}/@@PROG@@" "$@"
+else
+       exec "${GIT_EXEC_PATH}/@@PROG@@" "$@"
+fi