mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-06-15 15:51:42 +00:00
Fix coding-style in GPG and SSH agent plugins
This commit is contained in:
@ -6,22 +6,22 @@
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
local GPG_ENV="$HOME/.gnupg/gpg-agent.env"
|
||||
_gpg_env="$HOME/.gnupg/gpg-agent.env"
|
||||
|
||||
if (( ! $+commands[gpg-agent] )); then
|
||||
return
|
||||
fi
|
||||
|
||||
function _gpg-agent-start() {
|
||||
/usr/bin/env gpg-agent --daemon --enable-ssh-support --write-env-file "${GPG_ENV}" > /dev/null
|
||||
chmod 600 "${GPG_ENV}"
|
||||
source "${GPG_ENV}" > /dev/null
|
||||
gpg-agent --daemon --enable-ssh-support --write-env-file "${_gpg_env}"
|
||||
chmod 600 "${_gpg_env}"
|
||||
source "${_gpg_env}"
|
||||
}
|
||||
|
||||
# Source GPG agent settings, if applicable.
|
||||
if [[ -f "${GPG_ENV}" ]]; then
|
||||
source "${GPG_ENV}" > /dev/null
|
||||
ps -ef | grep "${SSH_AGENT_PID}" | grep gpg-agent > /dev/null || {
|
||||
if [[ -f "${_gpg_env}" ]]; then
|
||||
source "${_gpg_env}"
|
||||
ps -ef | grep "${SSH_AGENT_PID}" | grep -q 'gpg-agent' || {
|
||||
_gpg-agent-start
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user