summaryrefslogtreecommitdiff
path: root/mw
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2019-03-31 15:33:03 -0400
committerLuke Smith <luke@lukesmith.xyz>2019-03-31 15:33:03 -0400
commit12035bf1d69860b89ffd4a113ee5804b2f107120 (patch)
tree695eaea75b186233db8706aa882261469cac22f6 /mw
parent0b5ae9d490f2ef792cdd1230d86ec3cb0b757f49 (diff)
check of gpgemail validity
Diffstat (limited to 'mw')
-rwxr-xr-xmw2
1 files changed, 1 insertions, 1 deletions
diff --git a/mw b/mw
index 87d02ac..fcf71de 100755
--- a/mw
+++ b/mw
@@ -8,7 +8,7 @@ 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
[ ! -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="$(cat "$creddir/gpgemail" 2>/dev/null)" # Get previously set gpg email address
+gpgemail="$(grep "$emailre" "$creddir/gpgemail")" # Get previously set gpg email address
tmpdir="$(mktemp -d)"
GPG="gpg"; command -v gpg >/dev/null || GPG="gpg2" # Ensure proper gpg command