]> git.donarmstrong.com Git - bin.git/blobdiff - getmail
* add missing map
[bin.git] / getmail
diff --git a/getmail b/getmail
index 94808dde6dc6cf5c8ea8251f40d70f58b836250f..539fbfe821e60bf7e6a34e4dc8a52a30ed8b2b0e 100755 (executable)
--- a/getmail
+++ b/getmail
@@ -8,7 +8,7 @@ MUA=mutt
 
 # Don't check mail if ~/.nocheck exists and we're not running
 # interactively.
-if [[ -z "$CRON" && -e ~/.nocheck ]]; then
+if [ -z "$CRON" ] && [ -e ~/.nocheck ]; then
     exit 0;
 fi;
 
@@ -40,7 +40,7 @@ if [ -z "$CRON" ] || kill -0 `pgrep -U $(id -u) -x $MUA` 2>/dev/null; then
            # Clean the lists up too
            for account in bugs lists; do
                find /home/don/Mail/$account -maxdepth 1 -mindepth 1 -type d \
-                   -exec sh -c 'test $(find {} -type f |wc -l) -eq 0' ';' \
+                   -exec sh -c 'test $(find "{}" -type f |wc -l) -eq 0' ';' \
                    -printf '%f\000'|xargs -0 -rn 1 ~/bin/deletemailbox -a $account >/dev/null 2>&1;
                find /home/don/Mail/$account -maxdepth 2 -mindepth 2 -iname 'new' \
                    -type d -ctime +60 -printf '%h\n'|xargs -rn 1 basename|xargs \