Meta/Make: also support ksh
Junio C Hamano committed
Jul 29, 2024 at 19:07 UTC
b34709a925f8924f7d9421aa514163cd8c2723df
1 file changed
+10
-6
Make
+10
-6
@@ -55,7 +55,7 @@ do
55
)
56
done
57
58
-tests= jobs= oldtest= with_dash= testpen=
58
+tests= jobs= oldtest= with_shell= testpen=
59
clean=:
60
61
determine_branch () {
@@ -140,8 +140,14 @@ do
140
GIT_TEST_LONG=YesPlease
141
export GIT_TEST_LONG
142
;;
143
+ --bash)
144
+ with_shell=/bin/bash
145
+ ;;
146
--dash)
144
- with_dash=y
147
+ with_shell=/bin/dash
148
+ ;;
149
+ --ksh)
150
+ with_shell=/bin/ksh
151
;;
152
--)
153
shift
@@ -176,8 +182,6 @@ then
182
export GIT_TEST_OPTS
183
fi
184
179
-test -f /bin/dash || with_dash=
180
-
185
if test -z "$oldtest" &&
186
sh -c 'prove --version >/dev/null 2>&1' &&
187
sh -c 'prove --exec : >/dev/null 2>&1'
@@ -209,9 +213,9 @@ clean="$clean; rm -f version"
213
determine_long_version >version
214
215
set "prefix=$prefix" "$@"
212
-if test -n "$with_dash" && test -f /bin/dash
216
+if test -n "$with_shell" && test -f "$with_shell"
217
then
214
- set "SHELL_PATH=/bin/dash" "$@"
218
+ set "SHELL_PATH=$with_shell" "$@"
219
fi
220
221
if grep >/dev/null DC_SHA1 Makefile