1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

ctdb-tests: Move die() function to top of script

So it can be called within the script instead of just by scripts that
include it.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2017-08-03 20:57:47 +10:00 committed by Amitay Isaacs
parent ac1b1d8c8a
commit 661426df40

View File

@ -2,6 +2,12 @@
# Common variables and functions for all CTDB tests. # Common variables and functions for all CTDB tests.
# Print a message and exit.
die ()
{
echo "$1" >&2 ; exit ${2:-1}
}
# This expands the most probable problem cases like "." and "..". # This expands the most probable problem cases like "." and "..".
TEST_SUBDIR=$(dirname "$0") TEST_SUBDIR=$(dirname "$0")
if [ $(dirname "$TEST_SUBDIR") = "." ] ; then if [ $(dirname "$TEST_SUBDIR") = "." ] ; then
@ -37,9 +43,3 @@ esac
if [ -d "$_test_bin_dir" ] ; then if [ -d "$_test_bin_dir" ] ; then
PATH="${_test_bin_dir}:$PATH" PATH="${_test_bin_dir}:$PATH"
fi fi
# Print a message and exit.
die ()
{
echo "$1" >&2 ; exit ${2:-1}
}