| @@ -1,14 +1,15 @@ | |||||
| #!/bin/sh | #!/bin/sh | ||||
| muttdir="$HOME/.config/mutt" # Main mutt config location | muttdir="$HOME/.config/mutt" # Main mutt config location | ||||
| bindir="$HOME/.config/mutt/bin" # Location of scripts run by mutt or the wizard | |||||
| [ ! -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 | |||||
| [ ! -f "$HOME/.password-store/.gpg-id" ] && printf "\`pass\` must be installed and initialized to encrypt passwords.\\nBe sure it is installed and run \`pass init <yourgpgemail>\`.\\nIf you don't have a GPG public private key pair, run \`gpg --full-gen-key\` first.\\n" && exit | |||||
| accdir="$muttdir/accounts" # Directory for account settings | accdir="$muttdir/accounts" # Directory for account settings | ||||
| maildir="$HOME/.local/share/mail" # Location of mail storage | maildir="$HOME/.local/share/mail" # Location of mail storage | ||||
| bindir="$HOME/.config/mutt/bin" # Location of scripts run by mutt or the wizard | |||||
| namere="^[a-z_][a-z0-9_-]*$" # Regex to ensure viable username | namere="^[a-z_][a-z0-9_-]*$" # Regex to ensure viable username | ||||
| emailre=".\+@.\+\\..\+" # Regex to confirm valid email address | emailre=".\+@.\+\\..\+" # Regex to confirm valid email address | ||||
| mbsyncrc="$HOME/.mbsyncrc" | 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 | |||||
| tmpdir="$(mktemp -d)" | |||||
| sslcert="/etc/ssl/certs/ca-certificates.crt" | sslcert="/etc/ssl/certs/ca-certificates.crt" | ||||
| tmpdir="$(mktemp -d)" | |||||
| getprofiles() { \ | getprofiles() { \ | ||||
| unset msmtp_header msmtp_profile mutt_profile mbsync_profile | unset msmtp_header msmtp_profile mutt_profile mbsync_profile | ||||
| @@ -284,7 +285,6 @@ addtype() { \ | |||||
| main() { \ | main() { \ | ||||
| while : ; do | while : ; do | ||||
| [ ! -f "$HOME/.password-store/.gpg-id" ] && printf "\`pass\` must be installed and initialized to encrypt passwords.\\nBe sure it is installed and run \`pass init <yourgpgemail>\`.\\nIf you don't have a GPG public private key pair, run \`gpg --full-gen-key\` first.\\n" && exit | |||||
| printf "Welcome to:\\n\033[34m" | printf "Welcome to:\\n\033[34m" | ||||
| cat << "EOF" | cat << "EOF" | ||||
| _ __ ___ _ _| |_| |_ __ _(_)______ _ _ __ __| | | _ __ ___ _ _| |_| |_ __ _(_)______ _ _ __ __| | | ||||