mirror of
https://github.com/git/git.git
synced 2024-11-24 02:17:02 +08:00
c74c72034f
A #! line in these files is misleading, since these scriptlets are meant to be sourced with '.' (using whatever shell sources them) instead of run directly using the interpreter named on the #! line. Removing the #! line shouldn't hurt syntax highlighting since these files have filenames ending with '.sh'. For documentation, add a brief description of how the files are meant to be used in place of the shebang line. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
18 lines
455 B
Bash
18 lines
455 B
Bash
# Shell library sourced instead of ./test-lib.sh by tests that need
|
|
# to run under Bash; primarily intended for tests of the completion
|
|
# script.
|
|
|
|
if test -n "$BASH" && test -z "$POSIXLY_CORRECT"; then
|
|
# we are in full-on bash mode
|
|
true
|
|
elif type bash >/dev/null 2>&1; then
|
|
# execute in full-on bash mode
|
|
unset POSIXLY_CORRECT
|
|
exec bash "$0" "$@"
|
|
else
|
|
echo '1..0 #SKIP skipping bash completion tests; bash not available'
|
|
exit 0
|
|
fi
|
|
|
|
. ./test-lib.sh
|