aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-03-19 21:31:05 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-03-19 21:31:05 -0300
commit522dfd57b9419b50f77afcc29fdaec5c8ae6e252 (patch)
tree0d77fa7ad45cf38d159fb51755264ecd4e52a2e9
parent76cde135667b52ebb3b16de230370296fae660da (diff)
downloadkeyringer-522dfd57b9419b50f77afcc29fdaec5c8ae6e252.tar.gz
keyringer-522dfd57b9419b50f77afcc29fdaec5c8ae6e252.tar.bz2
Recrypt: just write to file if successful (#6)
-rwxr-xr-xshare/keyringer/recrypt3
1 files changed, 2 insertions, 1 deletions
diff --git a/share/keyringer/recrypt b/share/keyringer/recrypt
index 9153456..63f7bc6 100755
--- a/share/keyringer/recrypt
+++ b/share/keyringer/recrypt
@@ -23,7 +23,7 @@ function keyringer_recrypt {
fi
# Recrypt
- echo "$decrypted" | $GPG --use-agent --armor -e -s $(keyringer_recipients "$RECIPIENTS_FILE") > "$KEYDIR/$FILE"
+ recrypted="`echo "$decrypted" | $GPG --use-agent --armor -e -s $(keyringer_recipients "$RECIPIENTS_FILE")`"
if [ "$?" != "0" ]; then
echo "Recryption error."
@@ -31,6 +31,7 @@ function keyringer_recrypt {
fi
unset decrypted
+ echo "$recrypted" > "$KEYDIR/$FILE"
}
if [ ! -z "$2" ]; then