mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +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:
parent
ac1b1d8c8a
commit
661426df40
@ -2,6 +2,12 @@
|
||||
|
||||
# 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 "..".
|
||||
TEST_SUBDIR=$(dirname "$0")
|
||||
if [ $(dirname "$TEST_SUBDIR") = "." ] ; then
|
||||
@ -37,9 +43,3 @@ esac
|
||||
if [ -d "$_test_bin_dir" ] ; then
|
||||
PATH="${_test_bin_dir}:$PATH"
|
||||
fi
|
||||
|
||||
# Print a message and exit.
|
||||
die ()
|
||||
{
|
||||
echo "$1" >&2 ; exit ${2:-1}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user