Test for error

This commit is contained in:
Bob Mottram 2016-05-04 09:29:08 +01:00
parent 51c0a2a530
commit 5dc85c071d
No known key found for this signature in database
GPG Key ID: BA68F26108DC9F87
1 changed files with 2 additions and 2 deletions

View File

@ -702,12 +702,12 @@ function sign_gpg_key {
if [ ${#SIGN_ADDRESS} -gt 2 ]; then
clear
fpr=$(gpg --with-colons --fingerprint "$SIGN_ADDRESS" | grep fpr | head -n 1 | awk -F ':' '{print $10}')
if [[ $fpr == *"error"* ]]; then
if [ ! "$?" = "0" ]; then
gpg --search "$SIGN_ADDRESS"
fpr=$(gpg --with-colons --fingerprint "$SIGN_ADDRESS" | grep fpr | head -n 1 | awk -F ':' '{print $10}')
fi
if [[ $fpr != *"error"* ]]; then
if [ ! "$?" = "0" ]; then
if [ ${#fpr} -gt 2 ]; then
gpg --sign-key $fpr
if [ "$?" = "0" ]; then