From f4fa7d8e96c677bfd69f56af40f701456404dd0c Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Thu, 5 May 2011 13:13:50 +0200 Subject: [PATCH] bash: cleaned way to detect existance of gpg-agent --- files/.bashrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/.bashrc b/files/.bashrc index 6458fdd..e7847af 100644 --- a/files/.bashrc +++ b/files/.bashrc @@ -2,7 +2,7 @@ export LANG="en_GB.UTF-8" # GPG # -if [ ! -x "$(type -p gpg-agent)" ]; then +if ! type -p gpg-agent > /dev/null; then : elif test -f "$HOME/.gpg-agent-info" && kill -0 $(cut -d: -f2 "$HOME/.gpg-agent-info" 2> /dev/null ) 2> /dev/null; then