fixes a nasty bug on forge when run without /home/jrml/.gnupg

thanks to Giuliana Dieni for debbugging
This commit is contained in:
Jaromil 2014-04-04 14:52:15 +02:00
parent 0b846a79e7
commit cf66907fa2

5
tomb
View File

@ -1019,6 +1019,11 @@ forge_key() {
_warning "no key name specified for creation" _warning "no key name specified for creation"
return 1 } 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" } && { { test -r "$destkey" } && {
_warning "Forging this key would overwrite an existing file. Operation aborted." _warning "Forging this key would overwrite an existing file. Operation aborted."
die "`ls -lh $destkey`" } die "`ls -lh $destkey`" }