From fec7a1961ceaf7c9019623ce00ed47569dfcf27f Mon Sep 17 00:00:00 2001 From: Tharre Date: Sun, 26 Mar 2017 01:30:13 +0100 Subject: Enter passwords manually if pass is not available --- .req_pwd.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 .req_pwd.sh (limited to '.req_pwd.sh') diff --git a/.req_pwd.sh b/.req_pwd.sh new file mode 100755 index 0000000..bce131b --- /dev/null +++ b/.req_pwd.sh @@ -0,0 +1,14 @@ +#!/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 + +# if pass fails, request password manually +stty -echo +printf "Password: " >&2 +read passwd +stty echo +printf "\n" >&2 + +printf "$passwd" -- cgit v1.2.3-70-g09d2