about summary refs log tree commit diff
path: root/src/doc/rustc-dev-guide
diff options
context:
space:
mode:
authorMichael Bryan <michaelfbryan@gmail.com>2018-01-27 14:36:23 +0800
committerNiko Matsakis <niko@alum.mit.edu>2018-01-31 14:13:10 -0500
commit173a1083ea65b498d27ede37d841b02a4c5e7e65 (patch)
treec511d2e549510a47e08676177e9ee660d66e1f7c /src/doc/rustc-dev-guide
parentb9ad5b05a419c99b7a4e744d2671a90f7d840d1a (diff)
downloadrust-173a1083ea65b498d27ede37d841b02a4c5e7e65.tar.gz
rust-173a1083ea65b498d27ede37d841b02a4c5e7e65.zip
Updated CI to install and use mdbook-linkcheck
Diffstat (limited to 'src/doc/rustc-dev-guide')
-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)"