setenv GPG_TTY `tty`
if ( -f "/srv/scratch/${USER}/.gpg-agent-info" ) then
    set gpg_agent_file = "/srv/scratch/${USER}/.gpg-agent-info"
else if ( -f "${HOME}/.gpg-agent-info" ) then
    set gpg_agent_file = "${HOME}/.gpg-agent-info"
endif
if ( $?gpg_agent_file ) then
    foreach line (`cat ${gpg_agent_file}`)
        set command = "set name = '`echo '${line}' | sed -E 's/=.+//'`'"
	eval $command
        set command = "set value = '`echo '${line}' | sed -E 's/^.+=//'`'"
	eval $command
	eval "setenv ${name} ${value}"
    end
endif
