mdBook/ci/install-rust.sh

20 lines
423 B
Bash
Raw Normal View History

2019-10-21 05:44:28 +08:00
#!/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"
2020-07-08 05:08:51 +08:00
rustup update --no-self-update $TOOLCHAIN
2019-10-21 05:44:28 +08:00
rustup default $TOOLCHAIN
rustup -V
rustc -Vv
cargo -V