reordering for tmpdir and variables

This commit is contained in:
Luke Smith 2019-04-19 18:39:05 -04:00
parent e0f95fc390
commit 624be0878c
No known key found for this signature in database
GPG Key ID: 4C50B54A911F6252

8
mw
View File

@ -1,14 +1,15 @@
#!/bin/sh
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
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
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
tmpdir="$(mktemp -d)"
sslcert="/etc/ssl/certs/ca-certificates.crt"
tmpdir="$(mktemp -d)"
getprofiles() { \
unset msmtp_header msmtp_profile mutt_profile mbsync_profile
@ -284,7 +285,6 @@ addtype() { \
main() { \
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"
cat << "EOF"
_ __ ___ _ _| |_| |_ __ _(_)______ _ _ __ __| |