summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2018-03-06 01:11:45 -0700
committerLuke Smith <luke@lukesmith.xyz>2018-03-06 01:11:45 -0700
commit125e4399303a3c73d742ba0aece94472bbbb2d2c (patch)
tree8fd5ccff56a982cab584632dca3557ea237633ee
parent5875e570357bd025f7805e73e23e0bc773904b2f (diff)
old redundancy removed
-rwxr-xr-xetc/mailsync.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/etc/mailsync.sh b/etc/mailsync.sh
index 14b165e..61eeade 100755
--- a/etc/mailsync.sh
+++ b/etc/mailsync.sh
@@ -11,11 +11,11 @@
ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` >/dev/null || exit
# Get current number of new mail, then begin sync.
-ori=$(find ~/.mail -wholename '*/new/*' | grep /new/ | grep -vi "spam\|trash\|junk" | wc -l)
+ori=$(find ~/.mail -wholename '*/new/*' | grep -vi "spam\|trash\|junk" | wc -l)
offlineimap -o
-# Output new new mail count.
-new=$(find ~/.mail -wholename '*/new/*' | grep /new/ | grep -vi "spam\|trash\|junk" | wc -l)
+# Recount new mail.
+new=$(find ~/.mail -wholename '*/new/*' | grep -vi "spam\|trash\|junk" | wc -l)
# If new mail has grown, play a notification.
if [ "$new" -gt "$ori" ]; then