Split gpg-agent config by profile

This commit is contained in:
Fabio Scotto di Santolo
2026-04-08 14:54:05 +02:00
parent 98fc41fd83
commit 42b4635503
10 changed files with 69 additions and 3 deletions

View File

@@ -0,0 +1,17 @@
case "$(uname -r 2>/dev/null)" in
*[Mm]icrosoft*) ;;
*) return ;;
esac
command -v gpgconf >/dev/null 2>&1 || return
if tty -s; then
export GPG_TTY="$(tty)"
fi
gpgconf --launch gpg-agent >/dev/null 2>&1
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
if [ -n "${GPG_TTY-}" ]; then
gpg-connect-agent updatestartuptty /bye >/dev/null 2>&1
fi