From 8234dca93afd82f547b6f8a8b4caf32642fc6b28 Mon Sep 17 00:00:00 2001 From: David JULIEN Date: Tue, 16 Mar 2021 00:32:19 +0100 Subject: [PATCH] fix: no need to check for $opts before mbsync --- .local/bin/mailsync | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/mailsync b/.local/bin/mailsync index ed361ea..af1cd60 100755 --- a/.local/bin/mailsync +++ b/.local/bin/mailsync @@ -41,7 +41,7 @@ done ;} # Check account for new mail. Notify if there is new content. syncandnotify() { 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)" newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l) if [ "$newcount" -gt "0" ]; then