aboutsummaryrefslogtreecommitdiffstats
path: root/signal-desktop/Makefile
blob: 570a254e4361b17b270361d9147bff732a59fdaa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
.POSIX:

install:
	test -f ~/.var/opt/signal/SignalCrypt.img
	test -f ~/.var/opt/signal/SignalCrypt.key
	mkdir -p -- ~/.var/opt/signal/SignalCrypt.d
	test -e ~/.config/Signal || ln -sf -- ../.var/opt/signal/SignalCrypt.d/Signal ~/.config/Signal
	../check-any-installed asroot asroot-libpassphrase
	../check-installed gnupg
	../check-installed cryptsetup
	../check-installed key2root
	../check-installed-shebang mount-signal
	../check-installed-shebang umount-signal
	../check-installed-shebang signal-desktop
	mkdir -p -- ~/.local/bin/
	test ! -e ~/.local/bin/mount-signal || test -L ~/.local/bin/mount-signal
	ln -sf -- ~/.dotfiles/signal-desktop/mount-signal ~/.local/bin/
	test ! -e ~/.local/bin/umount-signal || test -L ~/.local/bin/umount-signal
	ln -sf -- ~/.dotfiles/signal-desktop/umount-signal ~/.local/bin/
	test ! -e ~/.local/bin/signal-desktop || test -L ~/.local/bin/signal-desktop
	ln -sf -- ~/.dotfiles/signal-desktop/signal-desktop ~/.local/bin/

uninstall:
	+! ../check-installed signal-desktop
	-unlink -- ~/.local/bin/mount-signal
	-unlink -- ~/.local/bin/umount-signal
	-unlink -- ~/.local/bin/signal-desktop