summaryrefslogtreecommitdiff
path: root/bin/mailsync
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2023-02-13 18:15:45 -0500
committerLuke Smith <luke@lukesmith.xyz>2023-02-13 18:15:45 -0500
commit6e44eb50566004f654eacb53e748bb3ff753e31a (patch)
tree1d0cd3fd16f2c4d6ac549fee062ef349bf127b1b /bin/mailsync
parentd890e0ea21d3617601a1e87bf3e95858c47e0cff (diff)
stupid fix and cli feedback
Diffstat (limited to 'bin/mailsync')
-rwxr-xr-xbin/mailsync8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/mailsync b/bin/mailsync
index daa4ecf..35a341c 100755
--- a/bin/mailsync
+++ b/bin/mailsync
@@ -63,9 +63,11 @@ syncandnotify() {
"$HOME/.local/share/mail/$2/"[Ii][Nn][Bb][Oo][Xx]/cur/ \
-type f -newer "$lastrun" 2> /dev/null)
newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l)
- [ -z "$MAILSYNC_MUTE" ] && case 1 in
- $((newcount > 0)) ) notify "$2" "$newcount" ;;
- esac
+ case "$newcount" in
+ 0) echo "No new mail for $2." ;;
+ *) echo "$newcount new mail for $2."
+ [ -z "$MAILSYNC_MUTE" ] && notify "$2" "$newcount" ;;
+esac
}
allaccounts="$(grep -hs "^\(Channel\|account\)" "$MBSYNCRC" "$MPOPRC")"