From 4176839a4f0a8afc26480c161c9e6d77f65dcadd Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sun, 20 May 2012 22:30:14 -0400 Subject: [PATCH] tweaks to gpg agent startup such that we give up if the ~/.gnupg directory is not yet available and silence the stdout a touch more. --- bash_functions | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bash_functions b/bash_functions index ff3432b..e15b250 100644 --- a/bash_functions +++ b/bash_functions @@ -1,3 +1,5 @@ +#!/bin/bash + function __available_projects(){ /bin/ls $HOME/src | tr " " "\n" } @@ -93,11 +95,12 @@ function get_ssh_agent(){ function get_gpg_agent(){ + readlink -f "$HOME/.gnupg" >/dev/null || return 0 agent_out="$HOME/.gnupg/agent.out" tmp=$(mktemp /tmp/gnupgXXXX) gpg-agent $* > $tmp && mv $tmp $agent_out - grep GPG_TTY $agent_out || \ + grep GPG_TTY $agent_out >/dev/null || \ cat >> $agent_out <