1
0
mirror of https://github.com/octoleo/Purse.git synced 2024-12-28 20:12:38 +00:00

Allow CLI arg for r/w/d

This commit is contained in:
Robby Dyer 2015-07-27 07:58:43 -04:00
parent df54fc8855
commit 5216a4584c

9
pwd.sh
View File

@ -160,8 +160,13 @@ sanity_check () {
sanity_check
read -n 1 -p "Read, write, or delete password? (r/w/d, default: r) " action
printf "\n"
if [ -z ${1+x} ]
then
read -n 1 -p "Read, write, or delete password? (r/w/d, default: r) " action
printf "\n"
else
action="$1"
fi
if [[ "${action}" =~ ^([wW])$ ]] ; then
create_username && write_pass