Browse Source

Test for error

Bob Mottram 9 years ago
parent
commit
5dc85c071d
No account linked to committer's email
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/freedombone-controlpanel-user

+ 2
- 2
src/freedombone-controlpanel-user View File

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