From 5a7db2f34aa6a6787d98a001b6d28be97f36abf4 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 25 Jun 2021 12:56:30 +0200 Subject: First commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- rust/Makefile | 20 ++++++++++++++++++++ rust/user-profile | 3 +++ 2 files changed, 23 insertions(+) create mode 100644 rust/Makefile create mode 100644 rust/user-profile (limited to 'rust') 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 -- cgit v1.2.3-70-g09d2