arch/pkg/de-p1st-gnupg/interactive-shell.holoscript
2023-08-13 16:13:44 +02:00

23 lines
426 B
Bash

#!/bin/sh
# stdin: default config
# stdout: modified config
set -e
cat
# shellcheck disable=SC2016
echo '
GPG_TTY=$(tty)
export GPG_TTY
gpg-connect-agent updatestartuptty /bye >/dev/null
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
export SSH_AUTH_SOCK
fi'
# Source import of public key
if [ -f ~/import-pubkey ]; then
. /etc/bashrc
fi