diff options
Diffstat (limited to 'rust/Makefile')
-rw-r--r-- | rust/Makefile | 11 |
1 files changed, 5 insertions, 6 deletions
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 |