On Wed, 16 Nov 2011 21:09:00 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote: > +# Note: TEST_TMPDIR *NOT* exported! > +TEST_TMPDIR=$(mktemp -d "${TMPDIR:-/tmp}/notmuch-test-$$.XXXXXX") Hi, Tomi. I don't think you need to do any of the variable gymnastics if you use the mktemp --tempdir option, which uses TMPDIR if set, but falls back to /tmp otherwise. This functionality is in the gnu version of mktemp at least. jamie.