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)"
16 while [[ -n "$dir" ]] && [[ "$dir" != "/" ]]; do
17 if [[ -x "$dir/notmuch" ]] && [[ ! -d "$dir/notmuch" ]]; then
21 dir="$(dirname "$dir")"
25 if [[ -z "${NOTMUCH_BUILDDIR}" ]]; then
26 export NOTMUCH_BUILDDIR="$(find_builddir "$(pwd)")"
28 if [[ -z "${NOTMUCH_BUILDDIR}" ]]; then
29 echo "Run tests in a subdir of built notmuch tree." >&2