mu-wizard

shell script to easily configure mu4e accounts on Emacs
git clone git://git.ckyln.com/mu-wizard
Log | Files | Refs | LICENSE

commit ebf900635bec2ad625849949998e85966b955fec
parent 43d86dd3439bb93c81770c28853921e1629d0cb4
Author: Cem Keylan <cem@ckyln.com>
Date:   Sun,  7 Feb 2021 11:17:36 +0300

test_connection(): do not pipe grep into sed

Diffstat:
Mbin/muw | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/bin/muw b/bin/muw @@ -487,10 +487,10 @@ test_connection() { while read -r dir; do mkdir -p "$MAILDIR/$title/${dir#/}"; done < /tmp/mbsync-boxes - drafts=$(grep -i drafts /tmp/mbsync-boxes | sed 1q) - trash=$(grep -i trash /tmp/mbsync-boxes | sed 1q) - inbox=$(grep -i inbox /tmp/mbsync-boxes | sed 1q) - sent=$(grep -i sent /tmp/mbsync-boxes | sed 1q) + drafts=$(sed -n '/[Dd][Rr][Aa][Ff][Tt][Ss]/{p;q}' /tmp/mbsync-boxes) + trash=$(sed -n '/[Tt][Rr][Aa][Ss][Hh]/{p;q}' /tmp/mbsync-boxes) + inbox=$(sed -n '/[Ii][Nn][Bb][Oo][Xx]/{p;q}' /tmp/mbsync-boxes) + sent=$(sed -n '/[Ss][Ee][Nn][Tt]/{p;q}' /tmp/mbsync-boxes) rm -f /tmp/mbsync-boxes }