summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rwxr-xr-xshare/keyringer/append6
-rwxr-xr-xshare/keyringer/encrypt8
2 files changed, 14 insertions, 0 deletions
diff --git a/share/keyringer/append b/share/keyringer/append
index 045ba86..bcc9e5e 100755
--- a/share/keyringer/append
+++ b/share/keyringer/append
@@ -32,4 +32,10 @@ for element in $(seq 0 $((${#NEW[@]} - 1))); do
echo ${NEW[$element]}
done | keyringer_exec encrypt-batch $BASEDIR $FILE
+err="$?"
+
+if [ "$err" != "0" ]; then
+ exit "$err"
+fi
+
IFS="$OLDIFS"
diff --git a/share/keyringer/encrypt b/share/keyringer/encrypt
index da0941f..3680d0b 100755
--- a/share/keyringer/encrypt
+++ b/share/keyringer/encrypt
@@ -23,7 +23,15 @@ fi
$GPG --use-agent --armor -e -s $(keyringer_recipients "$RECIPIENTS_FILE") - > "$KEYDIR/$FILE"
+err="$?"
+
+if [ "$err" != "0" ]; then
+ exit "$err"
+fi
+
# Stage
if [ -d "$BASEDIR/.git" ]; then
keyringer_exec git "$BASEDIR" add "keys/$FILE"
fi
+
+exit "$?"