all repos — dotfiles @ a52c56ff35e57ae369a018ac15fe161f39fe775c

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