projects
/
cmccabe-bin
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
f5049e9
)
enc.sh: add prompt for PASS, if it wasn't supplied
author
Colin P. Mccabe
<colin@cmccabe.xyz>
Tue, 21 Nov 2017 17:35:05 +0000 (09:35 -0800)
committer
Colin P. Mccabe
<colin@cmccabe.xyz>
Tue, 21 Nov 2017 17:35:05 +0000 (09:35 -0800)
enc.sh
patch
|
blob
|
history
diff --git
a/enc.sh
b/enc.sh
index
e6c51eb
..
de4c2a8
100755
(executable)
--- a/
enc.sh
+++ b/
enc.sh
@@
-5,10
+5,13
@@
die() {
exit 1
}
+if [[ "x${PASS}" = "x" ]]; then
+ read -s -p "enter password: " PASS
+fi
+
#[ "x${SALT}" = "x" ] && die "you must set SALT to the salt."
#SALT=$(dd count=1024 if=/dev/random 2>/dev/null |md5sum|sed 's/-//')
#[ $? -ne 0 ] && die "failed to generate SALT"
-[ "x${PASS}" = "x" ] && die "you must set PASS to the password"
RET=0
for FILE in "$@"; do