summaryrefslogtreecommitdiff
path: root/offlineimap-exit.sh
blob: 17861baa803aab811b7629e5bfc0d97db7af81fc (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

offlineimap='offlineimap'
output_file="`mktemp`"

$offlineimap "$@" 2>&1|tee "$output_file"

[ -z "`grep 'ERROR:' "$output_file"`" ]
status=$?
rm "$output_file"
exit $status