diff options
author | David Runge <dave@sleepmap.de> | 2015-04-14 09:30:49 +0200 |
---|---|---|
committer | David Runge <dave@sleepmap.de> | 2015-04-14 09:30:49 +0200 |
commit | b3e64616fabd289edd8f52b216d3ac5f388879ec (patch) | |
tree | 31d71fb8987146e174fd4f4667e1b2f025b6922b | |
parent | 7223cad768c1f60ce9a184759529fdcf5d8bf59e (diff) | |
download | dotfiles-b3e64616fabd289edd8f52b216d3ac5f388879ec.tar.gz dotfiles-b3e64616fabd289edd8f52b216d3ac5f388879ec.tar.bz2 dotfiles-b3e64616fabd289edd8f52b216d3ac5f388879ec.tar.xz dotfiles-b3e64616fabd289edd8f52b216d3ac5f388879ec.zip |
.zsh.after/export.zsh: Re-add keychain functionality for.. Debian.
-rw-r--r-- | .zsh.after/export.zsh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/.zsh.after/export.zsh b/.zsh.after/export.zsh index a602d79..5b485de 100644 --- a/.zsh.after/export.zsh +++ b/.zsh.after/export.zsh @@ -31,15 +31,18 @@ _JAVA_AWT_WM_NONREPARENTING=1; export _JAVA_AWT_WM_NONREPARENTING # GnuPG export GPG_TTY=$(tty) -# ssh-agent setting for use with gpg-agent -unset SSH_AGENT_PID -if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then - export SSH_AUTH_SOCK="${HOME}/.gnupg/S.gpg-agent.ssh" +if [[ "$(uname -v)" != *Debian* ]]; then + # ssh-agent setting for use with gpg-agent + unset SSH_AGENT_PID + if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then + export SSH_AUTH_SOCK="${HOME}/.gnupg/S.gpg-agent.ssh" + fi + # Explicitely starting gpg-agent in the background + gpgconf --launch gpg-agent +else + eval $(keychain --eval --agents gpg,ssh -Q --quiet ~/.ssh/id_rsa) fi -# Explicitely starting gpg-agent in the background -gpgconf --launch gpg-agent - if [[ $UID -ne 0 ]]; then export TMUX_TMPDIR="/run/user/$UID/tmux/" fi |