diff options
Diffstat (limited to '')
-rw-r--r-- | rust/Makefile | 20 | ||||
-rw-r--r-- | rust/user-profile | 3 |
2 files changed, 23 insertions, 0 deletions
diff --git a/rust/Makefile b/rust/Makefile new file mode 100644 index 0000000..d58e207 --- /dev/null +++ b/rust/Makefile @@ -0,0 +1,20 @@ +.POSIX: + +install: + if test -d ~/.cargo; then \ + test ! -d ~/.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 + +uninstall: + -rm -rf -- ~/.var/cache/cargo + -rm -rf -- ~/.cargo + -unlink -- ~/.config/profile.d/rust + -rmdir -- ~/.config/profile.d + +.PHONY: install uninstall diff --git a/rust/user-profile b/rust/user-profile new file mode 100644 index 0000000..be94b1a --- /dev/null +++ b/rust/user-profile @@ -0,0 +1,3 @@ +# -*- shell-script -*- + +export CARGO_HOME=~/.var/lib/cargo |