Skip to content

Commit

Permalink
fix: don’t leave rustup.sh behind or install an unused toolchain (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonSapin authored Dec 7, 2023
1 parent 54ee1af commit 3aada97
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/scripts/install.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
#!/usr/bin/env bash

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup.sh
chmod +x rustup.sh
./rustup.sh -y
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
-y --default-toolchain "$RUST_VERSION"

# shellcheck source=/dev/null
source "$HOME"/.cargo/env

if [ "$RUST_VERSION" != "stable" ]; then
rustup toolchain install "$RUST_VERSION"
rustup default "$RUST_VERSION"
fi

0 comments on commit 3aada97

Please sign in to comment.