From 7c4fe2e92918a3f05bd8dfcbafc0e3942cfca558 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 18 Sep 2014 16:37:46 -0300 Subject: Initial import --- gpg-agent-eval | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 gpg-agent-eval (limited to 'gpg-agent-eval') diff --git a/gpg-agent-eval b/gpg-agent-eval new file mode 100755 index 0000000..fab7334 --- /dev/null +++ b/gpg-agent-eval @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Initialize the gpg-agent +# + +# GPG Agent +GPG_TTY=`tty` +export GPG_TTY + +function gpg_agent_eval_run { + if test -f $HOME/.gpg-agent-info && \ + kill -0 `cut -d: -f 2 $HOME/.gpg-agent-info` 2>/dev/null; then + GPG_AGENT_INFO=`cat $HOME/.gpg-agent-info` + export GPG_AGENT_INFO + else + eval `gpg-agent --daemon` + echo $GPG_AGENT_INFO >$HOME/.gpg-agent-info + fi +} + +gpg_agent_eval_run -- cgit v1.2.3