From 0e60a3eda36cf6c59e4d1abcb2132f968ab5979b Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 16 Sep 2013 10:13:32 +0200 Subject: gpg-agent.sh: use source instead of eval Signed-off-by: Florian Pritz --- gpg-agent.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gpg-agent.sh') 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 # # 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 -- cgit v1.2.3-24-g4f1b