libtest: Make it easier to source interactively
When running the tests by hand, I wanted to be able to source `libtest.sh` from a running shell. Make this slightly easier by allowing one to set `SRCDIR`, since `$0` won't work.
This commit is contained in:
parent
d5efcc5a26
commit
f3800ec939
@ -25,7 +25,9 @@ if test -n "${LIBTEST_SH:-}"; then
|
||||
fi
|
||||
LIBTEST_SH=1
|
||||
|
||||
SRCDIR=$(dirname $0)
|
||||
if test -z "${SRCDIR:-}"; then
|
||||
SRCDIR=$(dirname $0)
|
||||
fi
|
||||
_cleanup_tmpdir () {
|
||||
if test -f ${test_tmpdir}/.test; then
|
||||
rm ${test_tmpdir} -rf
|
||||
|
Loading…
Reference in New Issue
Block a user