summaryrefslogtreecommitdiff
path: root/bin/mw
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2019-04-26 12:14:20 -0400
committerLuke Smith <luke@lukesmith.xyz>2019-04-26 12:14:20 -0400
commit942711e9da7ae177169222b891c8c2841fee4db1 (patch)
tree57353c01e42eefd24515cda74d2816e6efa99df6 /bin/mw
parenteb51f388cd44b25611b44650f5e88addd8f6711e (diff)
du not portable
Diffstat (limited to 'bin/mw')
-rwxr-xr-xbin/mw2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/mw b/bin/mw
index a25fa6a..1ddd164 100755
--- a/bin/mw
+++ b/bin/mw
@@ -192,7 +192,7 @@ tryconnect() { mkdir -p "$maildir/$title"
fi ;}
finalize() { \
- boxes="$(du -a "$maildir/$title/"* -d 0 | sed "s/^.*\//=/")"
+ boxes="$(find "$maildir/$title/" -mindepth 1 -maxdepth 1 | sed "s/^.*\//=/")"
[ -z "$boxes" ] && printf "\033[31mNo local mailboxes have been detected for %s.\033[0m\\nThis means that mbsync has not been successfully run.\\nRun mbsync, and if it has an error, be sure to check your password and server settings manually if needbe.\\n" "$title" && return
printf "Setting default mailboxes for your Inbox, Sent, Drafts and Trash in mutt...\\n"
spoolfile=$(echo "$boxes" | grep -i -m 1 inbox | sed 's/=/+/g')