aboutsummaryrefslogblamecommitdiffstats
path: root/gnupg/Makefile
blob: f5e6310a43db883f5f8bd54571994b9f33871236 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11


        







                                                                                       
                                       
                                                                                
                                                                          


                                                 



                                                                

          
                                   

                                            
                                   


                                              
.POSIX:

install:
	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 ! -e ~/.config/profile.d/gnupg || test -L ~/.config/profile.d/gnupg
	ln -sf -- ~/.dotfiles/gnupg/user-profile ~/.config/profile.d/gnupg
	../check-installed-shebang decrypt
	../check-installed-shebang encrypt
	../check-installed-shebang encrypt-nosign
	mkdir -p -- ~/.local/bin
	ln -sf -- ~/.dotfiles/gnupg/decrypt ~/.local/bin/
	ln -sf -- ~/.dotfiles/gnupg/encrypt ~/.local/bin/
	ln -sf -- ~/.dotfiles/gnupg/encrypt-nosign ~/.local/bin/

uninstall:
	+! ../check-installed gnupg
	-unlink -- ~/.config/profile.d/gnupg
	-rmdir -- ~/.config/profile.d
	-unlink -- ~/.var/lib/gnupg
	-unlink -- ~/.local/bin/decrypt
	-unlink -- ~/.local/bin/encrypt
	-unlink -- ~/.local/bin/encrypt-nosign