Check for empty string

This commit is contained in:
Bandie 2021-01-04 20:36:16 +01:00
parent 36eb4564a3
commit 7bb30f09f5
Signed by: Bandie
GPG Key ID: 843D7FA93BA46312
2 changed files with 10 additions and 2 deletions

4
start
View File

@ -101,7 +101,11 @@ function gpgSearch() {
if [ $? -eq 0 ]; then
export FFP=$(gpg -k "$(cat $TMP)" | head -n 2 | tail -n 1 | awk '{print $1}' | sed 's/.\{4\}/& /g;s/^\(.*\) $/\1/g')
gpg --batch --delete-key "$FFP"
if [ "$FFP" = "" ]; then
gpgSearch
else
return 0
fi
else
gpgSearch
fi

View File

@ -135,7 +135,11 @@ function gpgSearch() {
if [ $? -eq 0 ]; then
export FFP=$(gpg -k "$(cat $TMP)" | head -n 2 | tail -n 1 | awk '{print $1}' | sed 's/.\{4\}/& /g;s/^\(.*\) $/\1/g')
gpg --batch --delete-key "$FFP"
if [ "$FFP" = "" ]; then
gpgSearch
else
return 0
fi
else
gpgSearch
fi