summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-09-16 10:13:32 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-09-16 10:13:32 +0200
commit0e60a3eda36cf6c59e4d1abcb2132f968ab5979b (patch)
tree538e474c88685cd41bafe60d0a7131d21daa195f
parenta210dbe264b8480f0602e3bf95022e18e7f99f1b (diff)
downloadbin-0e60a3eda36cf6c59e4d1abcb2132f968ab5979b.tar.gz
bin-0e60a3eda36cf6c59e4d1abcb2132f968ab5979b.tar.xz
gpg-agent.sh: use source instead of eval
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xgpg-agent.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/gpg-agent.sh b/gpg-agent.sh
index ac6d385..067d73f 100755
--- a/gpg-agent.sh
+++ b/gpg-agent.sh
@@ -1,11 +1,10 @@
#!/bin/bash
#----------------------------------------------------
-# Version: 0.2.1
# Author: Florian "Bluewind" Pritz <flo@xssn.at>
#
# Licensed under WTFPL v2
# (see COPYING for full license text)
-#
+#
#----------------------------------------------------
# make working with the agent easier and prevent
# starting multiple agents
@@ -16,9 +15,10 @@ initgpg(){
[ -f "$XDG_CONFIG_HOME/disable-gpg-agent" ] && return 0
envfile="${XDG_DATA_HOME}/.gpginfo"
if test -f ${envfile} && test -S $(cut -d= -f 2 ${envfile} | head -n 2 | tail -n 1) 2>/dev/null; then
- eval $(< ${envfile})
+ . ${envfile}
else
- eval `/usr/bin/gpg-agent --daemon --enable-ssh-support --write-env-file ${envfile}`
+ /usr/bin/gpg-agent --daemon --enable-ssh-support --write-env-file ${envfile}
+ . ${envfile}
fi
export GPG_AGENT_INFO
export SSH_AUTH_SOCK