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

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