enc.sh: add password confirmation
authorColin P. Mccabe <colin@cmccabe.xyz>
Mon, 23 Sep 2019 17:53:58 +0000 (10:53 -0700)
committerColin P. Mccabe <colin@cmccabe.xyz>
Mon, 23 Sep 2019 17:53:58 +0000 (10:53 -0700)
enc.sh

diff --git a/enc.sh b/enc.sh
index de4c2a8..c399a7e 100755 (executable)
--- a/enc.sh
+++ b/enc.sh
@@ -7,6 +7,9 @@ die() {
 
 if [[ "x${PASS}" = "x" ]]; then
     read -s -p "enter password: " PASS
+    echo
+    read -s -p "re-enter password: " PASS2
+    [[ ${PASS} == ${PASS2} ]] || die "The passwords did not match."
 fi
 
 #[ "x${SALT}" = "x" ] && die "you must set SALT to the salt."