]>
Commit | Line | Data |
---|---|---|
ea925196 MO |
1 | #!/bin/sh |
2 | ||
3 | # wrap-for-bin.sh: Template for git executable wrapper scripts | |
4 | # to run test suite against sandbox, but with only bindir-installed | |
5 | # executables in PATH. The Makefile copies this into various | |
6 | # files in bin-wrappers, substituting | |
7 | # @@BUILD_DIR@@ and @@PROG@@. | |
8 | ||
9 | GIT_EXEC_PATH='@@BUILD_DIR@@' | |
160ad147 JH |
10 | if test -n "$NO_SET_GIT_TEMPLATE_DIR" |
11 | then | |
12 | unset GIT_TEMPLATE_DIR | |
13 | else | |
a94d305b | 14 | GIT_TEMPLATE_DIR='@@BUILD_DIR@@/templates/blt' |
160ad147 JH |
15 | export GIT_TEMPLATE_DIR |
16 | fi | |
20d2a30f | 17 | GITPERLLIB='@@BUILD_DIR@@/perl/build/lib'"${GITPERLLIB:+:$GITPERLLIB}" |
5e9637c6 | 18 | GIT_TEXTDOMAINDIR='@@BUILD_DIR@@/po/build/locale' |
ea925196 | 19 | PATH='@@BUILD_DIR@@/bin-wrappers:'"$PATH" |
2ec075d9 | 20 | |
5e9637c6 | 21 | export GIT_EXEC_PATH GITPERLLIB PATH GIT_TEXTDOMAINDIR |
ea925196 | 22 | |
84243646 EN |
23 | case "$GIT_DEBUGGER" in |
24 | '') | |
6a94088c | 25 | exec "${GIT_EXEC_PATH}/@@PROG@@" "$@" |
84243646 EN |
26 | ;; |
27 | 1) | |
28 | unset GIT_DEBUGGER | |
29 | exec gdb --args "${GIT_EXEC_PATH}/@@PROG@@" "$@" | |
30 | ;; | |
31 | *) | |
32 | GIT_DEBUGGER_ARGS="$GIT_DEBUGGER" | |
33 | unset GIT_DEBUGGER | |
34 | exec ${GIT_DEBUGGER_ARGS} "${GIT_EXEC_PATH}/@@PROG@@" "$@" | |
35 | ;; | |
36 | esac |