# final database contents should be the same regardless of when (or
# if) it is killed and restarted.
# final database contents should be the same regardless of when (or
# if) it is killed and restarted.
# Prepare a snapshot of the updated maildir. The gdb script will
# update the database in this snapshot as it goes.
# Prepare a snapshot of the updated maildir. The gdb script will
# update the database in this snapshot as it goes.
cp ${NOTMUCH_CONFIG} ${NOTMUCH_CONFIG}.snap
NOTMUCH_CONFIG=${NOTMUCH_CONFIG}.snap notmuch config set database.path $MAIL_DIR.snap
cp ${NOTMUCH_CONFIG} ${NOTMUCH_CONFIG}.snap
NOTMUCH_CONFIG=${NOTMUCH_CONFIG}.snap notmuch config set database.path $MAIL_DIR.snap