From 0f1df0db903ba576fd17b08197d3066af7a61e5f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 18 Nov 2023 23:23:40 +0100 Subject: A lot of changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- filesystem/Makefile | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'filesystem') diff --git a/filesystem/Makefile b/filesystem/Makefile index c726699..69433f5 100644 --- a/filesystem/Makefile +++ b/filesystem/Makefile @@ -1,5 +1,4 @@ .POSIX: -include ../common.mk HIDE =\ Templates\ @@ -14,14 +13,20 @@ HIDE =\ 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 -- ~/.var/cache/.thumbnails + mkdir -p -- $(CACHE_REAL)/.thumbnails rm -rf -- ~/.config/.cache - rm -rf -- ~/.cache + rm -rf -- $(CACHE_LINK) rm -rf -- ~/.thumbnails ln -sf -- ../.cache ~/.config/.cache - ln -sf -- .var/cache ~/.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 @@ -76,8 +81,11 @@ install: 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 @@ -112,5 +120,3 @@ uninstall: -for f in $(HIDE) cryptokey.gpg; do \ test ! -e ~/.hidden || grep -v '^'"$$f"'$$' < ~/.hidden | sponge ~/.hidden; \ done - -.PHONY: install uninstall -- cgit v1.2.3-70-g09d2