dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 76f45ef055afd61d16acd0fc69296aca9d1f5cad
parent 37ab24ffa00dda755784805e684dfdf5296c8362
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Sun,  8 Dec 2019 12:22:50 +0100

Add script to automatically generate mailboxes folder for mutt

Diffstat:
A.local/bin/mailboxes | 20++++++++++++++++++++
1 file changed, 20 insertions(+), 0 deletions(-)

diff --git a/.local/bin/mailboxes b/.local/bin/mailboxes @@ -0,0 +1,20 @@ +#!/bin/sh + +mailroot=$HOME/.mail + +die() { + printf '%s\n' "$1" >&2 + exit 1 +} + +if [ ! -d "$mailroot" ]; then + die "mailroot ($mailroot) does not exist" +fi + +echo "mailboxes \\" +cd $mailroot + +find . -type d | grep -v -e '^\.$' -e 'cur' -e 'new' -e 'tmp' | \ + sed 's/^\.\// "+/;s/$/" \\/' + +echo