dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit 2984a0008d104a7b2f7c51bfb339e845e665651c
parent 5c080109610896c3dabd9c1e7ded8ce30cade787
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Wed, 16 May 2018 15:31:54 -0400

Remove gpg-agent.conf

Actually just remove the file from the repo, since my-init changes it
and I don't want to have to deal with the repo being in a dirty state
forever. Instead have my-init create the file.

Diffstat:
D.gnupg/gpg-agent.conf | 3---
M.local/bin/my-init | 15+++++++++------
2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/.gnupg/gpg-agent.conf b/.gnupg/gpg-agent.conf @@ -1,3 +0,0 @@ -default-cache-ttl 600 -max-cache-ttl 7200 -enable-ssh-support diff --git a/.local/bin/my-init b/.local/bin/my-init @@ -74,8 +74,7 @@ then rm -rf "$HOME/.terminfo" rm -rf "$vim_bundle_path" rm "$HOME/.less" - cat "$HOME/.gnupg/gpg-agent.conf" | grep -v pinentry-program \ - | tee "$HOME/.gnupg/gpg-agent.conf" > /dev/null 2>&1 + rm "$HOME/.gnupg/gpg-agent.conf" fi if [ -f "$HOME/._.djmoch" ] @@ -193,10 +192,9 @@ EOF fi done -cat $HOME/.gnupg/gpg-agent.conf | grep pinentry-program -if [ $? -ne 0 ] +if [ ! -f "$HOME/.gnupg/gpg-agent.conf" ] then - echo " Configuring pinentry in gpg-agent.conf" + echo " Creating gpg-agent.conf and configuring pinentry" pinentry="" if type pinentry > /dev/null 2>&1 then @@ -212,7 +210,12 @@ then do if [ -x $testpath ] then - echo "pinentry-program $testpath" >> $HOME/.gnupg/gpg-agent.conf + cat > "$HOME/.gnupg/gpg-agent.conf" <<-EOF +default-cache-ttl 600 +max-cache-ttl 7200 +enable-ssh-support +pinentry-program $testpath +EOF break fi done