diff options
author | Luke Smith <luke@lukesmith.xyz> | 2018-03-17 10:34:06 -0700 |
---|---|---|
committer | Luke Smith <luke@lukesmith.xyz> | 2018-03-17 10:34:06 -0700 |
commit | 7110fa6e24bab2391e03a31665420bac86ee77f5 (patch) | |
tree | a98d06ae64aa2787d317f51f2a467924a20bb54d | |
parent | 9e5c382d2d994d4c863ae4ee4cbcdbdaa356f160 (diff) |
multiword mailbox fix
-rwxr-xr-x | mutt-wizard.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mutt-wizard.sh b/mutt-wizard.sh index a7e416d..076261a 100755 --- a/mutt-wizard.sh +++ b/mutt-wizard.sh @@ -9,11 +9,11 @@ fi muttdir="$HOME/.config/mutt/" -createMailboxes() { rm -f "$muttdir"autoconf/log - offlineimap --info -a $1 2&> "$muttdir"autoconf/log - for box in $(sed -n '/^Folderlist/,/^Folderlist/p' "$muttdir"autoconf/log | - grep "^ " | awk '{print $1}' | sed -e 's/\//./g') - do mkdir -p $HOME/.mail/$1/$box; done ;} +createMailboxes() { rm -f /tmp/log /tmp/lognew + offlineimap --info -a $1 2&> /tmp/log + sed -n '/^Folderlist/,/^Folderlist/p' /tmp/log | + grep "^ " | sed -e "s/\//./g;s/(.*//g;s/^ //g" > /tmp/lognew + while read box; do mkdir -p "$HOME/.mail/$1/$box"; done </tmp/lognew ;} chooseSync() { (crontab -l && testSync) || dialog --msgbox "No cronjob manager detected. Please install one and return to enable automatic mailsyncing" 10 60 ;} testSync() { (crontab -l | grep .config/mutt/etc/mailsync && removeSync) || addSync ;} |