]> git.friedersdorff.com Git - max/dotfiles.git/blobdiff - bash/.bash_profile
Change the way gpg agent is called
[max/dotfiles.git] / bash / .bash_profile
index c4958eba66df8a0efa9538ffa4eadba04ba02ddd..c80cb2dd74ef94227357e06a45e21e74337efec5 100644 (file)
@@ -18,13 +18,7 @@ if [ -f /etc/bash_completion ]; then
   . /etc/bash_completion
 fi
 
-envfile="$HOME/.gnupg/gpg-agent.env"
-if [[ -e "$envfile" ]] && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then
-  eval "$(cat "$envfile")"
-else
-  eval "$(gpg-agent --daemon --enable-ssh-support --write-env-file "$envfile")"
-fi
-export GPG_AGENT_INFO  # the env file does not contain the export statement
-export SSH_AUTH_SOCK   # enable gpg-agent for ssh
-
 export TMPDIR="/home/max/.local/tmp"
+
+gpg-agent --daemon --enable-ssh-support \
+  --write-env-file "${HOME}/.gpg-agent-info"