aboutsummaryrefslogtreecommitdiffstats
path: root/base/Makefile
blob: deeaa8c374cd0e4972b81a93b05d55161ce16a17 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
.POSIX:
include ../common.mk

FACE = penguin.png

install:
	mkdir -p -- ~/.config
	test ! -d ~/.profile
	test ! -d ~/.config/profile
	test ! -d ~/.config/user-dirs.locale
	test ! -d ~/.config/face
	test ! -d ~/.face
	test ! -d ~/.face.icon
	ln -sf -- .config/profile ~/.profile
	ln -sf -- ~/.dotfiles/base/profile ~/.config/profile
	ln -sf -- ~/.dotfiles/base/user-dirs.locale ~/.config/
	ln -sf -- ~/.dotfiles/base/faces/$(FACE) ~/.config/face
	ln -sf -- .face ~/.face.icon
	ln -sf -- .config/face ~/.face
	if test -L ~/.config/locations; then \
		test "$$(readlink -- ~/.config/locations)" = ~/.dotfiles/.secrets/locations; \
	else \
		test ! -e ~/.config/locations && \
		ln -s -- ~/.dotfiles/.secrets/locations ~/.config/locations; \
	fi
	test ! -d ~/.config/geolocation
	test ! -d ~/.config/metar
	test -L ~/.config/locations/current || test ! -e ~/.config/locations/current
	test -L ~/.config/locations/current || ln -sf default ~/.config/locations/current
	ln -sf locations/current/geolocation ~/.config/geolocation
	ln -sf locations/current/metar ~/.config/metar

uninstall:
	-unlink -- ~/.config/profile
	-unlink -- ~/.config/user-dirs.locale
	-unlink -- ~/.profile
	-unlink -- ~/.config/locations
	-unlink -- ~/.config/geolocation
	-unlink -- ~/.config/metar

.PHONY: install uninstall