dec.sh: add password prompt
authorColin P. Mccabe <colin@cmccabe.xyz>
Fri, 4 Aug 2017 23:31:57 +0000 (16:31 -0700)
committerColin P. Mccabe <colin@cmccabe.xyz>
Fri, 4 Aug 2017 23:31:57 +0000 (16:31 -0700)
dec.sh

diff --git a/dec.sh b/dec.sh
index bbad6c6..d5c2709 100755 (executable)
--- a/dec.sh
+++ b/dec.sh
@@ -5,7 +5,9 @@ die() {
     exit 1
 }
 
-[ "x${PASS}" = "x" ] && die "you must set PASS to the password"
+if [[ "x${PASS}" = "x" ]]; then
+    read -s -p "enter password: " PASS
+fi
 
 RET=0
 for FILE in "$@"; do