From 60428a5f01933071821ee2667f5da559c148ecd8 Mon Sep 17 00:00:00 2001 From: Morgan Wattiez Date: Sat, 16 Nov 2019 13:29:52 +0100 Subject: [PATCH] install Rust --- Brewfile | 1 + dot_bash_profile | 2 ++ dot_scripts/bootstrap.sh | 3 +++ dot_scripts/upgrade.sh | 2 +- dot_scripts/version.sh | 1 + dot_zshrc | 6 ++++-- 6 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 dot_scripts/version.sh diff --git a/Brewfile b/Brewfile index f05f129..f483b10 100644 --- a/Brewfile +++ b/Brewfile @@ -128,3 +128,4 @@ brew "tflint" # terraform linter brew "ktlint" # kotlin linter brew "cmake" # compiler, was needed for compiling YouCompleteMe, see https://github.com/ycm-core/YouCompleteMe brew "zola" # a simple and fast static site generator +brew "rustup" # Install Rust diff --git a/dot_bash_profile b/dot_bash_profile index e69de29..71ad6d4 100644 --- a/dot_bash_profile +++ b/dot_bash_profile @@ -0,0 +1,2 @@ + +export PATH="$HOME/.cargo/bin:$PATH" diff --git a/dot_scripts/bootstrap.sh b/dot_scripts/bootstrap.sh index 3a2dce1..bef9688 100755 --- a/dot_scripts/bootstrap.sh +++ b/dot_scripts/bootstrap.sh @@ -167,6 +167,9 @@ case "$(uname -s)" in ;; esac +# Use rustup to install the Rust compiler (rustc) and the Rust package manager (cargo). +rustup-init -y + # Upgrade ~/.scripts/upgrade.sh diff --git a/dot_scripts/upgrade.sh b/dot_scripts/upgrade.sh index 64d0ba4..34490dc 100755 --- a/dot_scripts/upgrade.sh +++ b/dot_scripts/upgrade.sh @@ -16,4 +16,4 @@ pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n pip freeze > ~/requirements.txt # Update VIM plugins installed via Vundle https://github.com/VundleVim/Vundle.vim vim +PluginUpdate +qall - +rustup-update diff --git a/dot_scripts/version.sh b/dot_scripts/version.sh new file mode 100644 index 0000000..7da15c8 --- /dev/null +++ b/dot_scripts/version.sh @@ -0,0 +1 @@ +rustc --version diff --git a/dot_zshrc b/dot_zshrc index 2bcecc1..cb862cd 100644 --- a/dot_zshrc +++ b/dot_zshrc @@ -116,11 +116,13 @@ export SDKMAN_DIR="$HOME/.sdkman" case "$(uname -s)" in Darwin) - ln -snf /usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/bin/pip pip3 + ln -snf /usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/bin/pip /usr/local/bin/pip3 export PATH="$PATH:/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/bin/:/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/bin" ;; esac . ~/.3llo_config export GOPATH="$HOME/go" -export PATH="/usr/local/opt/grep/libexec/gnubin:$GOPATH/bin:$PATH" +export RUSTPATH="$HOME/.cargo/bin" +export PATH="/usr/local/opt/grep/libexec/gnubin:$GOPATH/bin:$RUSTPATH:$PATH" +