You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

14 lines
388 B

#!/usr/bin/env bash
DIR="$(realpath "$(dirname -- "$0")")"
# set env variables to overwrite the directory where rust is installed into
export RUSTUP_HOME="$DIR/.rustup"
export CARGO_HOME="$DIR/.cargo"
# download rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path
# set the default rust version
source "$DIR/.cargo/env"
rustup default stable