#!/usr/bin/env bash
set -Eeuo pipefail

[[ -f ~/archive/notmuch-archive.today.txt ]] && {
  mv ~/archive/notmuch-archive.today.txt ~/archive/notmuch-archive.yesterday.txt
}
notmuch dump --output ~/archive/notmuch-archive.today.txt
