gpg: check that the configuration is in place

This commit is contained in:
Roman Zeyde
2016-12-02 13:10:33 +02:00
parent f86aae9a40
commit 9fe1a235c1
2 changed files with 11 additions and 0 deletions

View File

@@ -5,6 +5,13 @@ gpg2 --version >/dev/null # verify that GnuPG 2 is installed
export GNUPGHOME=~/.gnupg/trezor
CONFIG_PATH="${GNUPGHOME}/gpg-agent.conf"
if [ ! -f ${CONFIG_PATH} ]
then
echo "No configuration found: ${CONFIG_PATH}"
exit 1
fi
# Make sure that the device is unlocked before starting the shell
trezor-gpg-unlock