summary refs log tree commit diff stats
path: root/bin
diff options
context:
space:
mode:
authorBenjamin Morrison <ben@gbmor.org>2022-10-15 02:38:38 -0400
committerBenjamin Morrison <ben@gbmor.org>2022-10-15 02:40:45 -0400
commite53c78eedff7d6b51cb824f92671a73a7411d1f2 (patch)
treed80d245bae3846960df79a5460a188568d748c26 /bin
parent705b3c4c6ed218a1000ce8009ba0970885f20022 (diff)
downloaddogfiles-e53c78eedff7d6b51cb824f92671a73a7411d1f2.tar.gz
update git, gpg, neomutt confs for new gpg key.
add line to gk to make it easier to switch yubikeys.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/gk9
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/gk b/bin/gk
index a25edf8..942a890 100755
--- a/bin/gk
+++ b/bin/gk
@@ -1,9 +1,16 @@
 #!/bin/sh
+
+PARAM="$1"
+
 pkill -9 gpg-agent
 
 export GPG_TTY=$(tty)
 export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
-gpg-connect-agent updatestartuptty /bye
 
+if [ "$PARAM" = "switch" ]; then
+  gpg-connect-agent "scd serialno" "learn --force" /bye
+fi
+
+gpg-connect-agent updatestartuptty /bye
 gpgconf --create-socketdir