pantry/projects/gnupg.org/gpg

18 lines
275 B
Text
Raw Normal View History

#!/bin/sh
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-12 05:21:28 +03:00
if [ ! -f "$etc/gpg.conf" ]; then
mkdir -p "$etc"
2023-11-12 05:38:52 +03:00
chmod 700 "$etc"
2023-11-12 05:21:28 +03:00
cat << EOF > "$etc"/gpg.conf
use-agent
pinentry-mode loopback
agent-program $d/gpg-agent
EOF
fi
2023-11-12 05:21:28 +03:00
"$d"/gpg-exec "$@"