Skip to content
This repository has been archived by the owner on Oct 25, 2018. It is now read-only.

Commit

Permalink
Added key delete
Browse files Browse the repository at this point in the history
helps with #88
  • Loading branch information
diveshuttam committed Aug 20, 2018
1 parent 04279f0 commit 8db54ce
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/gui/key/delete.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
gui_key_delete(){
message error "<tt> ${FUNCNAME[0]} \n not implemented yet </tt>"
yesno "Are you sure you want to delete key?\n <tt>$GPG_KEY</tt>" || return 1
output=$(call cmd_key_delete 2>&1)
err=$?
is_true $DEBUG && echo "$output"

# TODO improve messages
# TODO Think something about force
if [[ $err == 0 ]]; then
message info "Key <tt>$GPG_KEY</tt> deleted!"
# GOTO no key found/switch context etc.
else
fail_details=$(echo "$output" | grep '^gpg:' | uniq | pango_raw)
message error "Failed to delete key <tt>$GPG_KEY</tt>.\n <tt>$fail_details</tt>"
return 1
fi
}
#
# This file is part of EasyGnuPG. EasyGnuPG is a wrapper around GnuPG
Expand Down

0 comments on commit 8db54ce

Please sign in to comment.