Trying to get gpg-agent working.
This commit is contained in:
parent
fb25a6b75d
commit
00a4da6ca1
1 changed files with 11 additions and 0 deletions
11
bin/gpg-agent.sh
Normal file
11
bin/gpg-agent.sh
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
envfile="${HOME}/.gnupg/gpg-agent.env"
|
||||
|
||||
if test -f "$envfile" && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then
|
||||
eval "$(cat "$envfile")"
|
||||
else
|
||||
eval "$(gpg-agent --daemon --write-env-file "$envfile")"
|
||||
fi
|
||||
|
||||
export GPG_AGENT_INFO # the env file does not contain the export statement
|
||||
Loading…
Add table
Add a link
Reference in a new issue