summaryrefslogtreecommitdiff
path: root/src/share/ma/add_certifier
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2009-02-19 00:35:50 -0500
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2009-02-19 00:35:50 -0500
commit6a7b42ec39aad2e774255b875af7ab40e80bb872 (patch)
tree9e369dea8ed5a7c513b68d05e254b49575fda4ca /src/share/ma/add_certifier
parentf02e0df059f0985cc00e41554cf26b3cb4efa3c1 (diff)
catch pipe failures more cleanly during key import
Diffstat (limited to 'src/share/ma/add_certifier')
-rw-r--r--src/share/ma/add_certifier3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/share/ma/add_certifier b/src/share/ma/add_certifier
index 2f29759..7c1441c 100644
--- a/src/share/ma/add_certifier
+++ b/src/share/ma/add_certifier
@@ -84,7 +84,8 @@ if [ -f "$keyID" ] ; then
# + failure 'could not read key from '\''/root/dkg.gpg'\'''
# + echo 'could not read key from '\''/root/dkg.gpg'\'''
- keyID=$(echo "$importinfo" | grep '^gpg: key ' | cut -f2 -d: | cut -f3 -d\ )
+ keyID=$(echo "$importinfo" | grep '^gpg: key ' | cut -f2 -d: | cut -f3 -d\ ) || \
+ failure "There were no gpg keys in the file."
if [ -z "$keyID" ] || [ $(echo "$keyID" | wc -l) -ne 1 ] ; then
failure "There was not exactly one gpg key in the file."
fi