blob: 3a6be86df107f85cf290c8085feac88ef2fbe4c1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/sh -e
# A simple wrapper script to deal with situations where pass, password-store, or
# my gpg key is not available.
pass "$1" && exit
# maybe gpg-agent is acting up, retry after restarting it
gpg-connect-agent "KILLAGENT" /bye >&2 >/dev/null
gpg-connect-agent /bye >&2 >/dev/null
pass "$1" && exit
# if pass fails, request password manually
stty -echo
printf "Password: " >&2
read passwd
stty echo
printf "\n" >&2
printf "$passwd"
|