1 # Source this script to set and export NOTMUCH_SRCDIR and
4 # For this to work, always have current directory somewhere within the
5 # build directory hierarchy, and run the script sourcing this script
6 # using a path (relative or absolute) to the source directory.
8 if [[ -z "${NOTMUCH_SRCDIR}" ]]; then
9 export NOTMUCH_SRCDIR="$(cd "$(dirname "$0")"/.. && pwd)"
15 while [[ -n "$dir" ]] && [[ "$dir" != "/" ]]; do
16 if [[ -x "$dir/notmuch" ]] && [[ ! -d "$dir/notmuch" ]]; then
20 dir="$(dirname "$dir")"
24 if [[ -z "${NOTMUCH_BUILDDIR}" ]]; then
25 export NOTMUCH_BUILDDIR="$(find_builddir "$(pwd)")"
27 if [[ -z "${NOTMUCH_BUILDDIR}" ]]; then
28 echo "Run tests in a subdir of built notmuch tree." >&2