diff options
author | Florian Pritz <f-p@gmx.at> | 2008-10-31 16:21:27 +0100 |
---|---|---|
committer | Florian Pritz <f-p@gmx.at> | 2008-10-31 16:21:27 +0100 |
commit | 3389e2ade2688df9b4fa6ef687c6dbfb608af879 (patch) | |
tree | 28c1ed42550d3636dcf2d7fa3295b722024ac442 | |
parent | 283f5e991820f025cec7ce35769d2628c99c90d2 (diff) | |
download | bin-3389e2ade2688df9b4fa6ef687c6dbfb608af879.tar.gz bin-3389e2ade2688df9b4fa6ef687c6dbfb608af879.tar.xz |
gpg-agent script
-rwxr-xr-x | gpg-agent.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gpg-agent.sh b/gpg-agent.sh new file mode 100755 index 0000000..c497a9b --- /dev/null +++ b/gpg-agent.sh @@ -0,0 +1,9 @@ +#!/bin/dash + +envfile="${HOME}/.gpginfo" + +if test -f ${envfile} && kill -0 $(cut -d: -f 2 ${envfile} | head -n 1) 2>/dev/null; then + eval $(cat ${envfile}) +else + eval `/usr/bin/gpg-agent --daemon --enable-ssh-support --write-env-file ${envfile}` +fi |