all repos — dotfiles @ ddaf8c92fd60f4bc6da960f978a7bd1b0ad4b219

my *nix dotfiles

bin/setup-gpg (view raw)

1#!/bin/sh
2# unlock gpg key on login
3
4pw="$(ssh-askpass 'Unlock your GPG key')"
5keygrip=$(gpg-connect-agent -q 'keyinfo --list' /bye | awk '/KEYINFO/ { print $3 }')
6
7for k in $keygrip; do
8    echo "$pw" | /usr/local/libexec/gpg-preset-passphrase --preset $k
9done