blob: 440b2bf33e1f28401d7a39d439507dfd692c6e56 (
plain)
1
2
3
4
5
6
7
8
9
|
#!/bin/bash
# Run offline imap, but "parse" the output to generate a sane exit status
output_file="$(mktemp --tmpdir "${0##*/}.XXXXXXXXXX")"
trap "rm -f $(printf '%q' "$output_file")" EXIT
offlineimap "$@" |& tee "$output_file"
! grep -q '^ERROR:' -- "$output_file"
|