summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/password-store.sh22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index 12ef62b..402563c 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -193,14 +193,10 @@ case "$command" in
cat | gpg -e -r "$ID" -o "$passfile" --yes
elif [[ $noecho -eq 1 ]]; then
while true; do
- stty -echo
- echo -n "Enter password for $path: "
- read password
+ read -p "Enter password for $path: " -s password
echo
- echo -n "Retype password for $path: "
- read password_again
+ read -p "Retype password for $path: " -s password_again
echo
- stty echo
if [[ $password == $password_again ]]; then
gpg -q -e -r "$ID" -o "$passfile" --yes <<<"$password"
break
@@ -233,14 +229,12 @@ case "$command" in
if [[ -d /dev/shm && -w /dev/shm && -x /dev/shm ]]; then
tmp_dir="$(TMPDIR=/dev/shm mktemp -t $template -d)"
else
- echo "Your system does not have /dev/shm, which means that it may"
- echo "be difficult to entirely erase the temporary non-encrypted"
- echo "password file after editing. Are you sure you would like to"
- echo -n "continue? [y/N] "
- read yesno
- if ! [[ $yesno == "y" || $yesno == "Y" ]]; then
- exit 1
- fi
+ prompt=$(echo "Your system does not have /dev/shm, which means that it may"
+ echo "be difficult to entirely erase the temporary non-encrypted"
+ echo "password file after editing. Are you sure you would like to"
+ echo -n "continue? [y/N] ")
+ read -p "$prompt" yesno
+ [[ $yesno == "y" || $yesno == "Y" ]] || exit 1
tmp_dir="$(mktemp -t $template -d)"
fi
tmp_file="$(TMPDIR="$tmp_dir" mktemp -t $template)"
from translationsRené 'Necoro' Neumann7-3639/+3479 2009-08-31Removed the 'translatable' attribute from 'gtk-*' stringsRené 'Necoro' Neumann5-11/+11 2009-08-31Removed TODO. Renamed ChangeLog to TODORené 'Necoro' Neumann2-40/+0 2009-08-27Only import stuff if necessaryRené 'Necoro' Neumann1-8/+8 2009-08-25Release the threadQueue-Lock in syncv0.13René 'Necoro' Neumann1-0/+1 2009-08-25Updated portugese translationAlberto Federman Neto1-650/+687 2009-08-15Update spanish translationDaniel Halens1-245/+258 2009-08-15Use boolean flags instead of obscure C flags for ipc.MessageQueueRené 'Necoro' Neumann3-13/+15 2009-08-15TypoRené 'Necoro' Neumann1-1/+1 2009-08-15Enhanced the extensions.shRené 'Necoro' Neumann1-3/+8 2009-08-15Move eix-format to correct locationRené 'Necoro' Neumann1-0/+0