diff options
-rwxr-xr-x | src/keygen.sh | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/keygen.sh b/src/keygen.sh index 716359b..801010a 100755 --- a/src/keygen.sh +++ b/src/keygen.sh | |||
@@ -2,24 +2,9 @@ | |||
2 | 2 | ||
3 | gpg_set_ultimate_trust() | 3 | gpg_set_ultimate_trust() |
4 | { | 4 | { |
5 | local keygrip | 5 | local keygrip d |
6 | keygrip=$(gpg -K --with-colons|sed -ne '/^sec:/{p;q}'|cut -d: -f5) || return | 6 | keygrip=$(gpg -K --with-colons --with-fingerprint --with-fingerprint|sed -ne '/^sec/{n;p;q}'|cut -d: -f10) |
7 | 7 | printf '%s:6:\n' "$keygrip" | gpg2 --import-ownertrust | |
8 | expect - -- "$keygrip" <<'END' | ||
9 | |||
10 | set keygrip "[lindex $argv 0]" | ||
11 | |||
12 | spawn gpg --edit-key "$keygrip" trust | ||
13 | |||
14 | expect "Your decision?" | ||
15 | send -- "5\n" | ||
16 | expect "Do you really want to set this key to ultimate trust?" | ||
17 | send -- "y\n" | ||
18 | expect "gpg>" | ||
19 | send -- "save\n" | ||
20 | send_tty "\r" | ||
21 | |||
22 | END | ||
23 | } | 8 | } |
24 | 9 | ||
25 | add() | 10 | add() |