blob: 69433f5f0c6a492ad8410bd6882e47398ae3c14a (
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
.POSIX:
HIDE =\
Templates\
Desktop\
Public\
Documents\
Downloads\
Music\
Pictures\
Videos\
public_html\
password.gpg\
mnt
CACHE_REAL != (mount | sed -n 's|^[^ ]* on \('"$${HOME}"'/.cache\)\(/[^ ]*\)\? .*$$|\1|p' ; printf '%s\n' "$$HOME/.var/cache") | sed 1q
CACHE_LINK != printf '%s\n' "$$HOME/.var/cache" "$$HOME/.cache" | grep -v '$(CACHE_REAL)'
IF_VAR_CACHE_IS_REAL != if ! test "$(CACHE_REAL)" = "$$HOME/.var/cache"; then printf '@: \n'; fi
IF_HOME_CACHE_IS_REAL != if ! test "$(CACHE_REAL)" = "$$HOME/.cache"; then printf '@: \n'; fi
install:
mkdir -p -- ~/.config
mkdir -p -- $(CACHE_REAL)/.thumbnails
rm -rf -- ~/.config/.cache
rm -rf -- $(CACHE_LINK)
rm -rf -- ~/.thumbnails
ln -sf -- ../.cache ~/.config/.cache
$(IF_VAR_CACHE_IS_REAL) ln -sf -- .var/cache ~/.cache
$(IF_HOME_CACHE_IS_REAL) ln -sf -- ../.cache ~/.var/cache
ln -sf -- .cache/.thumbnails ~/.thumbnails
mkdir -p -- ~/.var/opt
mkdir -p -- ~/.var/games
mkdir -p -- ~/.var/lib
mkdir -p -- ~/.var/mail
mkdir -p -- ~/.var/spool
rm -f -- ~/.spool
rm -f -- ~/.local/var
ln -sf .var/spool ~/.spool
mkdir -p -- ~/.local/bin
mkdir -p -- ~/.local/src
ln -sf -- ../.var ~/.local/var
if test -d ~/.fonts && test ! -L ~/.fonts; then \
mkdir -p -- ~/.local/share && \
test ! -e ~/.local/share/fonts && \
mv ~/.fonts ~/.local/share/fonts; \
else \
mkdir -p -- ~/.local/share/fonts && \
rm -f -- ~/.fonts && \
ln -sf -- .local/share/fonts ~/.fonts; \
fi
if test -d ~/.icons && test ! -L ~/.icons; then \
mkdir -p -- ~/.local/share && \
test ! -e ~/.local/share/icons && \
mv ~/.icons ~/.local/share/icons; \
else \
mkdir -p -- ~/.local/share/icons && \
rm -f -- ~/.icons && \
ln -sf -- .local/share/icons ~/.icons; \
fi
if test -d ~/.themes && test ! -L ~/.themes; then \
mkdir -p -- ~/.local/share && \
test ! -e ~/.local/share/themes && \
mv ~/.themes ~/.local/share/themes; \
else \
mkdir -p -- ~/.local/share/themes && \
rm -f -- ~/.themes && \
ln -sf -- .local/share/themes ~/.themes; \
fi
mkdir -p -- ~/.usr/bin
mkdir -p -- ~/.usr/include
mkdir -p -- ~/.usr/lib
mkdir -p -- ~/.usr/libexec
mkdir -p -- ~/.usr/share/man
mkdir -p -- ~/.usr/src
ln -sf -- ~/.dotfiles/filesystem/user-dirs.dirs ~/.config/
set -e && for f in $(HIDE); do \
test -e ~/.hidden && grep '^'"$$f"'$$' < ~/.hidden > /dev/null || printf '%s\n' "$$f" >> ~/.hidden; \
done
if test "$$(hostname | tr '[[:upper:]]' '[[:lower:]]')" = zenith; then \
test -e ~/.hidden && grep '^cryptokey.gpg$$' < ~/.hidden > /dev/null || printf '%s\n' "cryptokey.gpg" >> ~/.hidden; \
fi
uninstall:
+! ../check-installed filesystem
+! ../check-installed base-files
-unlink -- ~/.config/user-dirs.dirs
-unlink -- ~/.config/.cache
-unlink -- ~/.var/cache
-unlink -- ~/.cache
-unlink -- ~/.thumbnails
-unlink -- ~/.spool
-unlink -- ~/.local/var
-unlink -- ~/.fonts
-unlink -- ~/.icons
-unlink -- ~/.themes
-rmdir -- ~/.config
-rmdir -- ~/.var/cache/.thumbnails
-rmdir -- ~/.var/cache
-rmdir -- ~/.var/opt
-rmdir -- ~/.var/games
-rmdir -- ~/.var/lib
-rmdir -- ~/.var/mail
-rmdir -- ~/.var/spool
-rmdir -- ~/.var
-rmdir -- ~/.local/bin
-rmdir -- ~/.local/src
-rmdir -- ~/.local/share/fonts
-rmdir -- ~/.local/share/icons
-rmdir -- ~/.local/share/themes
-rmdir -- ~/.local/share
-rmdir -- ~/.local
-rmdir -- ~/.usr/bin
-rmdir -- ~/.usr/include
-rmdir -- ~/.usr/lib
-rmdir -- ~/.usr/libexec
-rmdir -- ~/.usr/share/man
-rmdir -- ~/.usr/share
-rmdir -- ~/.usr/src
-rmdir -- ~/.usr
-for f in $(HIDE) cryptokey.gpg; do \
test ! -e ~/.hidden || grep -v '^'"$$f"'$$' < ~/.hidden | sponge ~/.hidden; \
done
|