From 624be0878c3de900f745f0863ac569bed8813ab1 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 19 Apr 2019 18:39:05 -0400 Subject: [PATCH] reordering for tmpdir and variables --- mw | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mw b/mw index ad3ef85..0c7ffe2 100755 --- a/mw +++ b/mw @@ -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 \`.\\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 \`.\\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" _ __ ___ _ _| |_| |_ __ _(_)______ _ _ __ __| |