mutt-wizard

fork of Luke Smiths mutt-wizard
git clone git://git.jakekoroman.com/mutt-wizard
Log | Files | Refs | README | LICENSE

commit 3b17feb777a63ac5e2ae99af6c28b6960b610ed8
parent a799ffb1577e22f81cd55b7eda2b34e87708d621
Author: Luke Smith <luke@lukesmith.xyz>
Date:   Wed, 17 Apr 2019 15:43:18 -0400

suppress errors

Diffstat:
Mmw | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mw b/mw @@ -8,7 +8,7 @@ namere="^[a-z_][a-z0-9_-]*$" # Regex to ensure viable username emailre=".\+@.\+\\..\+" # Regex to confirm valid email address mbsyncrc="$HOME/.mbsyncrc" [ ! -f "$muttdir/domains.csv" ] || [ ! -d "$bindir" ] && printf "Read the README. Be sure to put the repo in the right place before running.\\n" && exit 1 -gpgemail="$(grep "$emailre" "$creddir/gpgemail")" # Get previously set gpg email address +gpgemail="$(grep "$emailre" "$creddir/gpgemail" 2>/dev/null)" # Get previously set gpg email address tmpdir="$(mktemp -d)" GPG="gpg"; command -v gpg >/dev/null || GPG="gpg2" # Ensure proper gpg command @@ -129,7 +129,7 @@ addaccount() { \ done domain="$(echo "$fulladdr" | sed "s/.*@//")" printf "\\nSearching for \033[32m%s\033[0m in \033[34m\`domains.csv\`\033[0m..." "$domain" - serverinfo="$(grep "$domain" "$muttdir/domains.csv")" + serverinfo="$(grep "$domain" "$muttdir/domains.csv" 2>/dev/null)" if [ -z "$serverinfo" ]; then printf "Your email domain is not in mutt-wizard's database yet.\\nmutt-wizard will still autoconfigure everything, but you will have to manually type in your service's IMAP and SMTP server information.\\nYou can usually quickly find this by internet searching for it.\\n" printf "Insert the IMAP server for your email provider (excluding the port number)\\n\033[36m\t" @@ -161,7 +161,7 @@ EOF read -r login printf "\033[0m" [ -z "$login" ] && login="$fulladdr" - grep "i[0-9]" "$muttdir/personal.muttrc" | awk '{print $3}' | sed -e 's/i//g' > "$tmpdir/mutt_used" + grep "i[0-9]" "$muttdir/personal.muttrc" 2>/dev/null | awk '{print $3}' | sed -e 's/i//g' > "$tmpdir/mutt_used" seq 1 9 > "$tmpdir/mutt_all" idnum=$(diff "$tmpdir/mutt_all" "$tmpdir/mutt_used" | sed -n 2p | awk '{print $2}') getpass