pantry/projects/gnupg.org/gpg

18 lines
286 B
Text
Raw Normal View History

#!/bin/sh
2023-11-21 16:07:51 +03:00
d="$(dirname "$0")"
2023-11-12 05:38:52 +03:00
etc="$d/../etc/gnupg"
2023-11-12 06:30:31 +03:00
export GNUPGHOME="${GNUPGHOME:-"$etc"}"
2023-11-12 06:01:18 +03:00
2023-11-21 16:07:51 +03:00
if [ ! -f "$etc/gpg.conf" ]; then
mkdir -p "$etc"
chmod 700 "$etc"
cat << EOF > "$etc"/gpg.conf
use-agent
pinentry-mode loopback
agent-program $d/gpg-agent
EOF
2023-11-21 16:07:51 +03:00
exec "$d"/gpg-exec "$@"