summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-02-26 12:32:05 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-02-26 12:32:05 -0300
commit67adc630f06c7779937a410f1d5925ad51f6e017 (patch)
tree4e4e9b1b8812c5ead1e0d8e78eadc6c0470b0f5f /share
parent27b131115b3e983575cc2f64c695d2269baa15e6 (diff)
downloadkeyringer-67adc630f06c7779937a410f1d5925ad51f6e017.tar.gz
keyringer-67adc630f06c7779937a410f1d5925ad51f6e017.tar.bz2
Check return status (closes #7)
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 "$?"