You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
325 B
Bash
12 lines
325 B
Bash
#!/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
|