From 681b762d505aa449ec83fee789b1544b9357a442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=BAniak?= Date: Wed, 13 May 2020 22:51:02 +0200 Subject: [PATCH] Changed new variable in the script Signed-off-by: Marcin Wozniak --- bin/mailsync | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/mailsync b/bin/mailsync index 3104c65..9de3ee7 100755 --- a/bin/mailsync +++ b/bin/mailsync @@ -31,7 +31,7 @@ fi syncandnotify() { acc="$(echo "$account" | sed "s/.*\///")" mbsync $opts "$acc" - 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 $(ls $HOME/.local/share/mail/$acc/* | grep -i inbox | sed 's/\://')/new -type f -newer "$HOME/.config/mutt/.mailsynclastrun" 2> /dev/null) newcount=$(echo "$new" | sed '/^\s*$/d' | wc -l) if [ "$newcount" -gt "0" ]; then notify "$acc" "$newcount" &