mirror of
https://github.com/rust-lang/mdBook
synced 2024-12-13 14:22:35 +00:00
19 lines
423 B
Bash
Executable file
19 lines
423 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Install/update rust.
|
|
# The first argument should be the toolchain to install.
|
|
|
|
set -ex
|
|
if [ -z "$1" ]
|
|
then
|
|
echo "First parameter must be toolchain to install."
|
|
exit 1
|
|
fi
|
|
TOOLCHAIN="$1"
|
|
|
|
rustup set profile minimal
|
|
rustup component remove --toolchain=$TOOLCHAIN rust-docs || echo "already removed"
|
|
rustup update --no-self-update $TOOLCHAIN
|
|
rustup default $TOOLCHAIN
|
|
rustup -V
|
|
rustc -Vv
|
|
cargo -V
|