2023-11-12 02:34:33 +03:00
|
|
|
#!/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 02:34:33 +03:00
|
|
|
|
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
|
2023-11-12 02:34:33 +03:00
|
|
|
use-agent
|
|
|
|
pinentry-mode loopback
|
|
|
|
agent-program $d/gpg-agent
|
|
|
|
EOF
|
2023-11-21 16:22:34 +03:00
|
|
|
fi
|
2023-11-12 02:34:33 +03:00
|
|
|
|
2023-11-21 16:07:51 +03:00
|
|
|
exec "$d"/gpg-exec "$@"
|