Browse Source

fix blank opt flag

If no options are passed but the accounts are specified then the blank opt flag causes a (harmless) error message from mbsync about an empy channel.
pull/454/head
rjl6789 4 years ago
parent
commit
073b76c68f
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      bin/mailsync

+ 1
- 1
bin/mailsync View File

@@ -30,7 +30,7 @@ fi
# Check account for new mail. Notify if there is new content. # Check account for new mail. Notify if there is new content.
syncandnotify() { syncandnotify() {
acc="$(echo "$account" | sed "s/.*\///")" acc="$(echo "$account" | sed "s/.*\///")"
mbsync "$opts" "$acc"
if [ -z "$opts" ]; then mbsync "$acc"; else mbsync "$opts" "$acc"; fi
new=$(find "$HOME/.local/share/mail/$acc/INBOX/new/" "$HOME/.local/share/mail/$acc/Inbox/new/" "$HOME/.local/share/mail/$acc/inbox/new/" -type f -newer "$HOME/.config/mutt/.mailsynclastrun" 2> /dev/null) new=$(find "$HOME/.local/share/mail/$acc/INBOX/new/" "$HOME/.local/share/mail/$acc/Inbox/new/" "$HOME/.local/share/mail/$acc/inbox/new/" -type f -newer "$HOME/.config/mutt/.mailsynclastrun" 2> /dev/null)
newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l) newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l)
if [ "$newcount" -gt "0" ]; then if [ "$newcount" -gt "0" ]; then


Loading…
Cancel
Save