Check for empty string
This commit is contained in:
parent
36eb4564a3
commit
7bb30f09f5
4
start
4
start
@ -101,7 +101,11 @@ function gpgSearch() {
|
|||||||
if [ $? -eq 0 ]; then
|
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')
|
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"
|
gpg --batch --delete-key "$FFP"
|
||||||
|
if [ "$FFP" = "" ]; then
|
||||||
|
gpgSearch
|
||||||
|
else
|
||||||
return 0
|
return 0
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
gpgSearch
|
gpgSearch
|
||||||
fi
|
fi
|
||||||
|
@ -135,7 +135,11 @@ function gpgSearch() {
|
|||||||
if [ $? -eq 0 ]; then
|
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')
|
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"
|
gpg --batch --delete-key "$FFP"
|
||||||
|
if [ "$FFP" = "" ]; then
|
||||||
|
gpgSearch
|
||||||
|
else
|
||||||
return 0
|
return 0
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
gpgSearch
|
gpgSearch
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user