commit 624be0878c3de900f745f0863ac569bed8813ab1 parent e0f95fc390fa36b3cc8dff18c40b9968cc5d09e8 Author: Luke Smith <luke@lukesmith.xyz> Date: Fri, 19 Apr 2019 18:39:05 -0400 reordering for tmpdir and variables Diffstat:
M | mw | | | 8 | ++++---- |
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git 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 <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" _ __ ___ _ _| |_| |_ __ _(_)______ _ _ __ __| |