diff options
Diffstat (limited to 'gnupg')
-rw-r--r-- | gnupg/Makefile | 11 | ||||
-rw-r--r-- | gnupg/user-profile | 2 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gnupg/Makefile b/gnupg/Makefile index f89880c..6583b2d 100644 --- a/gnupg/Makefile +++ b/gnupg/Makefile @@ -2,7 +2,14 @@ include ../common.mk install: - mkdir -p -- ~/.var/lib/gnupg + mkdir -p -- ~/.dotfiles/.secrets/gnupg + mkdir -p -- ~/.var/lib + if test -L ~/.var/lib/gnupg; then \ + test "$$(readlink -- ~/.var/lib/gnupg)" = ~/.dotfiles/.secrets/gnupg; \ + else \ + test ! -e ~/.var/lib/gnupg && \ + ln -s -- ~/.dotfiles/.secrets/gnupg ~/.var/lib/gnupg; \ + fi mkdir -p -- ~/.config/profile.d test ! -d ~/.config/profile.d/gnupg ln -sf -- ~/.dotfiles/gnupg/user-profile ~/.config/profile.d/gnupg @@ -10,6 +17,6 @@ install: uninstall: -unlink -- ~/.config/profile.d/gnupg -rmdir -- ~/.config/profile.d - -rmdir -- ~/.var/lib/gnupg + -unlink -- ~/.var/lib/gnupg .PHONY: install uninstall diff --git a/gnupg/user-profile b/gnupg/user-profile index 67cbb86..3736519 100644 --- a/gnupg/user-profile +++ b/gnupg/user-profile @@ -1,6 +1,6 @@ # -*- shell-script -*- -export GNUPGHOME=~/.var/lib/.gnupg +export GNUPGHOME=~/.var/lib/gnupg export GPG_KEY=69E7C5ED export GPG_KEYA=45668AAD |