summaryrefslogtreecommitdiffstats
path: root/vendor/mdbook/ci/install-rust.sh
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/mdbook/ci/install-rust.sh')
-rwxr-xr-xvendor/mdbook/ci/install-rust.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/vendor/mdbook/ci/install-rust.sh b/vendor/mdbook/ci/install-rust.sh
new file mode 100755
index 000000000..c608c70d0
--- /dev/null
+++ b/vendor/mdbook/ci/install-rust.sh
@@ -0,0 +1,19 @@
+#!/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