* usr/lib/byobu/mail: LP: #1118364

- support maildir format
This commit is contained in:
Dustin Kirkland 2013-02-07 08:54:55 -06:00
commit e6c6d633c6
2 changed files with 7 additions and 3 deletions

3
debian/changelog vendored
View file

@ -1,6 +1,7 @@
byobu (5.32) unreleased; urgency=low byobu (5.32) unreleased; urgency=low
* UNRELEASED * usr/lib/byobu/mail: LP: #1118364
- support maildir format
-- Dustin Kirkland <kirkland@ubuntu.com> Wed, 06 Feb 2013 23:16:22 -0600 -- Dustin Kirkland <kirkland@ubuntu.com> Wed, 06 Feb 2013 23:16:22 -0600

View file

@ -22,11 +22,14 @@
MAILFILE="/var/spool/mail/$USER" MAILFILE="/var/spool/mail/$USER"
__mail_detail() { __mail_detail() {
[ -s "$MAILFILE" ] && ls -alF "$MAILFILE" 2>&1 [ ! -d "$MAILFILE" ] && [ -s "$MAILFILE" ] && ls -alF "$MAILFILE" 2>&1
[ -d "$MAILFILE/new" ] && ls -AlF "$MAILFILE/new" 2>&1
} }
__mail() { __mail() {
if [ -s "$MAILFILE" ]; then if [ -f "$MAILFILE" ] && [ -s "$MAILFILE" ]; then
color b; printf "%s" "$ICON_MAIL"; color --
elif [ -d "$MAILFILE/new" ] && "$(ls -A "$MAILFILE/new" 2>/dev/null)"; then
color b; printf "%s" "$ICON_MAIL"; color -- color b; printf "%s" "$ICON_MAIL"; color --
else else
rm -f "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/mail"* rm -f "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/mail"*