1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-27 01:46:34 +02:00
git/t/lib-bash.sh
Jonathan Nieder c74c72034f test: replace shebangs with descriptions in shell libraries
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>
2013-11-26 14:23:52 -08:00

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