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 --- rust/Makefile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'rust') diff --git a/rust/Makefile b/rust/Makefile index cc81345..05911fb 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -1,21 +1,20 @@ .POSIX: -include ../common.mk install: if test -d ~/.cargo; then \ - test ! -d ~/.var/lib/cargo && \ + (test ! -e ~/.var/lib/cargo || test -L ~/.var/lib/cargo) && \ mkdir -p -- ~/.var/lib && \ mv ~/.cargo ~/.var/lib/cargo; \ else \ mkdir -p -- ~/.var/lib; \ fi - test ! -d ~/.config/profile.d/rust - ln -sf -- ~/.dotfiles/rust/user-profile ~/.config/profile.d/rust + test ! -e ~/.config/profile.d/cargo || test -L ~/.config/profile.d/cargo + ln -sf -- ~/.dotfiles/cargo/user-profile ~/.config/profile.d/cargo uninstall: + +! ../check-installed rust + +! ../check-installed cargo -rm -rf -- ~/.var/cache/cargo -rm -rf -- ~/.cargo -unlink -- ~/.config/profile.d/rust -rmdir -- ~/.config/profile.d - -.PHONY: install uninstall -- cgit v1.2.3-70-g09d2