6 ps -ef | grep gpg-agent >&2 ||:
18 echo >&2 "$0: GPG AGENT STARTP $@ TIMED OUT"
23 sleeptime=$(echo "($sleeptime + 0.001) * 2" | bc -l)
27 kill_agent_not_running () {
28 LC_MESSAGES=C gpg-connect-agent --no-autostart </dev/null \
30 | tee -a /dev/stderr \
31 | grep 'no gpg-agent running' >&2
34 echo >&2 'GPG-WITHAGENT... PRE-STOPPING'
36 retry_until_ok kill_agent_not_running
39 gpg-connect-agent --no-autostart </dev/null \
40 '/echo dgit-gpg-agent-ok' /bye 2>&1 \
41 | grep dgit-gpg-agent-ok >&2
45 $DGIT_STUNT_AGENT --daemon </dev/null >&2
46 retry_until_ok agent_is_running
48 echo >&2 'GPG-WITHAGENT... RUNNING'
54 --agent-program=$DGIT_STUNT_AGENT "$@" 2>&9
60 echo >&2 'GPG-WITHAGENT... STOPPING'
62 retry_until_ok kill_agent_not_running
64 echo >&2 'GPG-WITHAGENT... DONE'