From cf66907fa2c891e71661970e0c1c198afab14227 Mon Sep 17 00:00:00 2001 From: Jaromil Date: Fri, 4 Apr 2014 14:52:15 +0200 Subject: [PATCH] fixes a nasty bug on forge when run without /home/jrml/.gnupg thanks to Giuliana Dieni for debbugging --- tomb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tomb b/tomb index c8121d7..e848e78 100755 --- a/tomb +++ b/tomb @@ -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`" }