aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/password-store.sh
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2014-12-24 12:55:37 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2014-12-24 12:55:37 +0100
commitec27ece8fcc0bde0571cafe2ed28b15614536d27 (patch)
treec3ce8fa56a25a440aadb3d9923ec60d0fa60c874 /src/password-store.sh
parentKeep track of correct TTY for pinentry at start of script, in case we take over stdin later. (diff)
downloadpassword-store-ec27ece8fcc0bde0571cafe2ed28b15614536d27.tar.xz
password-store-ec27ece8fcc0bde0571cafe2ed28b15614536d27.zip
agent-check: goodbye
The latest gpg-agent from the 2.1 series no longer requires these environment variables and will instead start gpg-agent as it needs.
Diffstat (limited to 'src/password-store.sh')
-rwxr-xr-xsrc/password-store.sh11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/password-store.sh b/src/password-store.sh
index 1bf6306..727967e 100755
--- a/src/password-store.sh
+++ b/src/password-store.sh
@@ -80,16 +80,7 @@ set_gpg_recipients() {
GPG_RECIPIENTS+=( "$gpg_id" )
done < "$current"
}
-agent_check() {
- [[ ! -t 0 || -n $GPG_AGENT_INFO ]] || yesno "$(cat <<-_EOF
- You are not running gpg-agent. This means that you will
- need to enter your password for each and every gpg file
- that pass processes. This could be quite tedious.
- Are you sure you would like to continue without gpg-agent?
- _EOF
- )"
-}
reencrypt_path() {
local prev_gpg_recipients="" gpg_keys="" current_keys="" index passfile
local groups="$($GPG --list-config --with-colons | grep "^cfg:group:.*")"
@@ -299,7 +290,6 @@ cmd_init() {
git_add_file "$gpg_id" "Set GPG id to ${id_print%, }."
fi
- agent_check
reencrypt_path "$PREFIX/$id_path"
git_add_file "$PREFIX/$id_path" "Reencrypt password store using new GPG id ${id_print%, }."
}
@@ -350,7 +340,6 @@ cmd_find() {
cmd_grep() {
[[ $# -ne 1 ]] && die "Usage: $PROGRAM $COMMAND search-string"
- agent_check
local search="$1" passfile grepresults
while read -r -d "" passfile; do
grepresults="$($GPG -d "${GPG_OPTS[@]}" "$passfile" | grep --color=always "$search")"