Use array for MAILBOX_DIR, to permit mutliple mailboxes

This commit is contained in:
flyingscorpio@arch-desktop 2023-04-21 09:44:19 +02:00
parent de4ebdc14d
commit a79cfd1d17

View file

@ -8,7 +8,7 @@ if [ -z "$LABEL" ]; then
LABEL='New: '
fi
nb_new=$(find "$MAILBOX_DIR" -type d -name new -not -empty -execdir ls '{}' \+ | wc -l)
nb_new=$(find "${MAILBOX_DIR[@]}" -type d -name new -not -empty -execdir ls '{}' \+ | wc -l)
if [ "$nb_new" -gt 0 ]; then
echo "${LABEL}${nb_new}"