From 21fdef6f8629bc246d59d204416fb2037ecbbfd8 Mon Sep 17 00:00:00 2001 From: Rodolphe Breard Date: Tue, 28 Jun 2016 23:14:30 +0200 Subject: [PATCH] Correct the export guards. --- .bashrc | 4 ++-- .zshrc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.bashrc b/.bashrc index 5cd1ea9..905f2f6 100644 --- a/.bashrc +++ b/.bashrc @@ -37,8 +37,8 @@ fi # GPG Agent export GPG_TTY=$(tty) -[ -f "/run/user/${UID}/gnupg/S.gpg-agent" ] && export GPG_AGENT_INFO="/run/user/${UID}/gnupg/S.gpg-agent" -[ -f "/run/user/${UID}/gnupg/S.gpg-agent.ssh" ] && export SSH_AUTH_SOCK="/run/user/${UID}/gnupg/S.gpg-agent.ssh" +[ -S "/run/user/${UID}/gnupg/S.gpg-agent" ] && export GPG_AGENT_INFO="/run/user/${UID}/gnupg/S.gpg-agent" +[ -S "/run/user/${UID}/gnupg/S.gpg-agent.ssh" ] && export SSH_AUTH_SOCK="/run/user/${UID}/gnupg/S.gpg-agent.ssh" pgrep -x -u "${USER}" gpg-agent >/dev/null 2>&1 && export SSH_AGENT_PID=$(pgrep -x -u "${USER}" gpg-agent) # Aliases diff --git a/.zshrc b/.zshrc index bdc58ea..d02b040 100644 --- a/.zshrc +++ b/.zshrc @@ -41,8 +41,8 @@ fi # GPG Agent export GPG_TTY=$(tty) -[ -f "/run/user/${UID}/gnupg/S.gpg-agent" ] && export GPG_AGENT_INFO="/run/user/${UID}/gnupg/S.gpg-agent" -[ -f "/run/user/${UID}/gnupg/S.gpg-agent.ssh" ] && export SSH_AUTH_SOCK="/run/user/${UID}/gnupg/S.gpg-agent.ssh" +[ -S "/run/user/${UID}/gnupg/S.gpg-agent" ] && export GPG_AGENT_INFO="/run/user/${UID}/gnupg/S.gpg-agent" +[ -S "/run/user/${UID}/gnupg/S.gpg-agent.ssh" ] && export SSH_AUTH_SOCK="/run/user/${UID}/gnupg/S.gpg-agent.ssh" pgrep -x -u "${USER}" gpg-agent >/dev/null 2>&1 && export SSH_AGENT_PID=$(pgrep -x -u "${USER}" gpg-agent) # Aliases