commit 3611dd4c4b066f85c5169706bf83322d5cebed4a
parent 9422149c8e3b91ecc689bc840515db06a8d67765
Author: Mark Feller <mark@mfeller.io>
Date: Thu, 16 Dec 2021 18:50:36 -0700
split gpg-agent config into macos and linxu
Diffstat:
4 files changed, 46 insertions(+), 38 deletions(-)
diff --git a/diff b/diff
@@ -1,16 +1,35 @@
-#!/bin/sh -x
+#!/bin/sh -e
-diff dots/.ssh/config $HOME/.ssh/config
-diff dots/.zshenv $HOME/.zshenv
-diff -r dots/.config/aliasrc $HOME/.config/aliasrc
-diff -r dots/.config/emacs $HOME/.config/emacs
-diff -r dots/.config/git $HOME/.config/git
-diff -r dots/.config/lf $HOME/.config/lf
-diff -r dots/.config/mpd $HOME/.config/mpd
-diff -r dots/.config/ncmpcpp $HOME/.config/ncmpcpp
-diff -r dots/.config/notmuch $HOME/.config/notmuch
-diff -r dots/.config/offlineimap $HOME/.config/offlineimap
-diff -r dots/.config/zsh $HOME/.config/zsh
-diff -r dots/.local/bin $HOME/.local/bin
-diff -r dots/.local/share/emacs $HOME/.local/share/emacs
-diff -r dots/.local/share/gnupg $HOME/.local/share/gnupg
+dff() {
+ diff $@ | sed '/Only in/d'
+}
+
+linux() {
+ dff -r dots/.config/mpd $HOME/.config/mpd
+ dff -r dots/.config/ncmpcpp $HOME/.config/ncmpcpp
+ dff -r dots/.config/notmuch $HOME/.config/notmuch
+ dff -r dots/.config/offlineimap $HOME/.config/offlineimap
+ dff dots/.local/share/gnupg/gpg-agent.conf.linux $HOME/.local/share/gnupg/gpg-agent.conf
+}
+
+macos() {
+ dff dots/.zshenv $HOME/.zshenv
+ dff dots/.local/share/gnupg/gpg-agent.conf.macos $HOME/.local/share/gnupg/gpg-agent.conf
+}
+
+shared() {
+ dff dots/.ssh/config $HOME/.ssh/config
+ dff -r dots/.config/aliasrc $HOME/.config/aliasrc
+ dff -r dots/.config/emacs $HOME/.config/emacs
+ dff -r dots/.config/git $HOME/.config/git
+ dff -r dots/.config/lf $HOME/.config/lf
+ dff -r dots/.config/zsh $HOME/.config/zsh
+ dff -r dots/.local/bin $HOME/.local/bin
+ dff -r dots/.local/share/emacs $HOME/.local/share/emacs
+}
+
+case "$(uname -s)" in
+ Linux*) shared; linux ;;
+ Darwin*) shared; macos ;;
+ *) echo "Usage: $0 [-d]"; exit 1 ;;
+esac
diff --git a/dots/.local/share/gnupg/gpg-agent.conf.linux b/dots/.local/share/gnupg/gpg-agent.conf.linux
@@ -0,0 +1 @@
+pinentry-program /usr/bin/pinentry-gtk
diff --git a/dots/.local/share/gnupg/gpg-agent.conf b/dots/.local/share/gnupg/gpg-agent.conf.macos
diff --git a/install b/install
@@ -22,37 +22,25 @@ shared()
copy dots/.config/aliasrc $HOME/.config
copy dots/.local/bin $HOME/.local
copy dots/.local/share/emacs $HOME/.local/share
- copy dots/.local/share/gnupg $HOME/.local/share
}
linux()
{
# Linux specific dotfiles
- copy dots/.config/compton $HOME/.config
- copy dots/.config/dunst $HOME/.config
- copy dots/.config/mimeapps.list $HOME/.config
- copy dots/.config/vis $HOME/.config
- copy dots/.config/x11 $HOME/.config
+ copy dots/.config/compton $HOME/.config
+ copy dots/.config/dunst $HOME/.config
+ copy dots/.config/mimeapps.list $HOME/.config
+ copy dots/.config/vis $HOME/.config
+ copy dots/.config/x11 $HOME/.config
+ copy dots/.local/share/gnupg/*.linux $HOME/.local/share/gnupg
}
macos()
{
# macOS specific dotfiles
- copy dots/.config/alacritty $HOME/.config
- copy dots/.zshenv $HOME
-}
-
-bootstrap_linux()
-{
- return
-}
-
-bootstrap_macos()
-{
- # Install macOS packages
- command -v brew >/dev/null || bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- brew install $(awk '$1 == "B" { print $2 }' pkgs/macos) || true
- brew upgrade $(awk '$1 == "B" { print $2 }' pkgs/macos) || true
+ copy dots/.config/alacritty $HOME/.config
+ copy dots/.zshenv $HOME
+ copy dots/.local/share/gnupg/*.macos $HOME/.local/share/gnupg
}
if [ -d "$rice_dir" ]; then
@@ -69,7 +57,7 @@ fi
cd "$rice_dir"
case "$(uname -s)" in
- Linux*) shared; linux; [ "$1" = "-d" ] || bootstrap_linux ;;
- Darwin*) shared; macos; [ "$1" = "-d" ] || bootstrap_macos ;;
+ Linux*) shared; linux ;;
+ Darwin*) shared; macos ;;
*) echo "Usage: $0 [-d]"; exit 1 ;;
esac