diff options
Diffstat (limited to 'txt/get-mailboxes.txt')
| -rwxr-xr-x | txt/get-mailboxes.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/txt/get-mailboxes.txt b/txt/get-mailboxes.txt new file mode 100755 index 0000000..b6ceff0 --- /dev/null +++ b/txt/get-mailboxes.txt @@ -0,0 +1,17 @@ +#!/bin/sh + +maildir=$1 + +# Find these specific paths so they stick at the top of the list +MAILBOXES='"+Inbox" "+Sent" "+Trash" "+Drafts" "+Junk" ' + +#Find all other paths, excluding those from above +MAILBOXES=$MAILBOXES`find "${maildir}" -type d -name cur \ + -a -not \( -ipath "*Inbox*" \ + -o -ipath "*Sent*" \ + -o -ipath "*Drafts*" \ + -o -ipath "*Trash*" \ + -o -ipath "*Junk*" \ + \) | sed -e 's/\/cur$/\"/g' -e "s#^${maildir}/# \"+#" | sort` + +echo $MAILBOXES
\ No newline at end of file |
