tfixes a nasty bug on forge when run without /home/jrml/.gnupg - tomb - the crypto undertaker
HTML git clone git://parazyd.org/tomb.git
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit cf66907fa2c891e71661970e0c1c198afab14227
DIR parent 0b846a79e764d535ff8c70888c623e21fa1109e2
HTML Author: Jaromil <jaromil@dyne.org>
Date: Fri, 4 Apr 2014 14:52:15 +0200
fixes a nasty bug on forge when run without /home/jrml/.gnupg
tthanks to Giuliana Dieni for debbugging
Diffstat:
M tomb | 5 +++++
1 file changed, 5 insertions(+), 0 deletions(-)
---
DIR diff --git a/tomb b/tomb
t@@ -1019,6 +1019,11 @@ forge_key() {
_warning "no key name specified for creation"
return 1 }
+ # make sure that gnupg doesn't quits with an error before first run
+ { test -r $HOME/.gnupg/pubring.gpg } && {
+ mkdir $HOME/.gnupg
+ touch $HOME/.gnupg/pubring.gpg }
+
{ test -r "$destkey" } && {
_warning "Forging this key would overwrite an existing file. Operation aborted."
die "`ls -lh $destkey`" }