This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AGENT_SOCK=$(gpgconf --list-dirs | grep agent-socket | cut -d : -f 2) | |
if [[ ! -S $AGENT_SOCK ]]; then | |
gpg-agent --daemon --use-standard-socket &>/dev/null | |
fi | |
export GPG_TTY=$TTY | |
# Set SSH to use gpg-agent if it's enabled | |
GNUPGCONFIG="${GNUPGHOME:-"$HOME/.gnupg"}/gpg-agent.conf" | |
if [[ -r $GNUPGCONFIG ]] && command grep -q enable-ssh-support "$GNUPGCONFIG"; then |