浏览代码

suppress errors

tags/v3.1
Luke Smith 5 年前
父节点
当前提交
3b17feb777
找不到此签名对应的密钥 GPG 密钥 ID: 4C50B54A911F6252
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. +3
    -3
      mw

+ 3
- 3
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


正在加载...
取消
保存