aboutsummaryrefslogtreecommitdiffstats
path: root/gnupg/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--gnupg/Makefile11
1 files changed, 9 insertions, 2 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