about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide/ci/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/doc/rustc-dev-guide/ci/install.sh')
-rw-r--r--src/doc/rustc-dev-guide/ci/install.sh20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/doc/rustc-dev-guide/ci/install.sh b/src/doc/rustc-dev-guide/ci/install.sh
index 2d32caaa9a0..81cbd8fb72d 100644
--- a/src/doc/rustc-dev-guide/ci/install.sh
+++ b/src/doc/rustc-dev-guide/ci/install.sh
@@ -1,12 +1,20 @@
 #!/bin/bash
 set -ex
 
-if command -v mdbook >/dev/null 2>&1; then
-    echo "mdbook already installed at $(command -v mdbook)"
-else
-    echo "installing mdbook"
-    cargo install mdbook --vers "0.0.28"
-fi
+function cargo_install() {
+  local name=$1
+  local version=$2
+
+  if command -v $name >/dev/null 2>&1; then
+    echo "$name is already installed at $(command -v $name)"
+  else
+    echo "Installing $name"
+    cargo install $name --version $version
+  fi
+}
+
+cargo_install mdbook 0.1.1
+cargo_install mdbook-linkcheck 0.1.0
 
 if command -v ghp-import >/dev/null 2>&1; then
     echo "ghp-import already installed at $(which ghp-import)"