fix: no need to check for $opts before mbsync
This commit is contained in:
parent
6e2cf9214e
commit
8234dca93a
@ -41,7 +41,7 @@ done ;}
|
|||||||
# 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/.*\///")"
|
||||||
if [ -z "$opts" ]; then mbsync "$acc"; else mbsync "$opts" "$acc"; fi
|
mbsync "$acc"
|
||||||
new="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/$acc/[Ii][Nn][Bb][Oo][Xx]/new/* -type f -newer "${XDG_CONFIG_HOME:-$HOME/.config}/mutt/.mailsynclastrun" 2>/dev/null)"
|
new="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/$acc/[Ii][Nn][Bb][Oo][Xx]/new/* -type f -newer "${XDG_CONFIG_HOME:-$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
|
||||||
|
Reference in New Issue
Block a user