Create a gpg key is the ID isn't found

This commit is contained in:
Bob Mottram 2017-09-18 21:31:06 +01:00
parent 55c76ed6f6
commit ad02634386
1 changed files with 6 additions and 5 deletions

View File

@ -1380,12 +1380,13 @@ function configure_gpg {
MY_GPG_PUBLIC_KEY_ID=$(gpg_pubkey_from_email "$MY_USERNAME" "$MY_EMAIL_ADDRESS") MY_GPG_PUBLIC_KEY_ID=$(gpg_pubkey_from_email "$MY_USERNAME" "$MY_EMAIL_ADDRESS")
if [ ${#MY_GPG_PUBLIC_KEY_ID} -lt 4 ]; then if [ ${#MY_GPG_PUBLIC_KEY_ID} -lt 4 ]; then
echo $'GPG public key ID could not be obtained' echo $'GPG public key ID could not be obtained'
else
chown -R $MY_USERNAME:$MY_USERNAME $gpg_dir
chmod 700 $gpg_dir
chmod 600 $gpg_dir/*
mark_completed $FUNCNAME
return
fi fi
chown -R $MY_USERNAME:$MY_USERNAME $gpg_dir
chmod 700 $gpg_dir
chmod 600 $gpg_dir/*
mark_completed $FUNCNAME
return
fi fi
if [ ! -d $gpg_dir ]; then if [ ! -d $gpg_dir ]; then