diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | offlineimap-exit.sh | 11 | ||||
-rw-r--r-- | offlineimap-runner.sh | 2 |
4 files changed, 14 insertions, 1 deletions
@@ -11,6 +11,7 @@ hangman-helper maildups newegg offlineimap-runner +offlineimap-exit ord roll sysfiles @@ -17,6 +17,7 @@ BINFILES = \ maildups \ newegg \ offlineimap-runner \ + offlineimap-exit \ ord \ roll \ sysfiles \ diff --git a/offlineimap-exit.sh b/offlineimap-exit.sh new file mode 100644 index 0000000..17861ba --- /dev/null +++ b/offlineimap-exit.sh @@ -0,0 +1,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 diff --git a/offlineimap-runner.sh b/offlineimap-runner.sh index 4828f35..189bda3 100644 --- a/offlineimap-runner.sh +++ b/offlineimap-runner.sh @@ -32,7 +32,7 @@ default_limit=2 limit=${1-$default_limit} cookie_file="$HOME/.offlineimap.cookie" -offlineimap='offlineimap -u quiet' +offlineimap='offlineimap-exit' # Try running offlineimap if $offlineimap; then |