aboutsummaryrefslogtreecommitdiffstats
path: root/claws-mail/Makefile
blob: 200ef2411e7e2c045b50c712d4d38dc559b37ccc (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
.POSIX:

install:
	mkdir -p -- ~/.claws-mail
	test ! -d ~/.claws-mail/clawsrc
	ln -sf -- ~/.dotfiles/claws-mail/clawsrc ~/.claws-mail/clawsrc
	if test -e Mail; then \
		test -d ~/Mail && \
		test ! -e ~/.var/mail && \
		mkdir -p -- ~/.var && \
		mv -- ~/Mail ~/.var/mail; \
	else \
		mkdir -p -- ~/.var/mail; \
	fi
	ln -sf -- .var/mail ~/Mail
	test -e ~/.hidden && grep '^Mail$' < ~/.hidden || printf '%s\n' "Mail" >> ~/.hidden

uninstall:
	-unlink -- ~/.claws-mail/clawsrc
	-rmdir -- ~/.claws-mail
	-unlink -- ~/Mail
	-test ! -e ~/.hidden || grep -v '^Mail$' < ~/.hidden | sponge ~/.hidden

.PHONY: install uninstall