Skip to content

Commit 9cbd9ab

Browse files
Michael-F-Bryannikomatsakis
authored andcommitted
Updated CI to install and use mdbook-linkcheck
1 parent 3a268d1 commit 9cbd9ab

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

ci/install.sh

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
#!/bin/bash
22
set -ex
33

4-
if command -v mdbook >/dev/null 2>&1; then
5-
echo "mdbook already installed at $(command -v mdbook)"
6-
else
7-
echo "installing mdbook"
8-
cargo install mdbook --vers "0.0.28"
9-
fi
4+
function cargo_install() {
5+
local name=$1
6+
local version=$2
7+
8+
if command -v $name >/dev/null 2>&1; then
9+
echo "$name is already installed at $(command -v $name)"
10+
else
11+
echo "Installing $name"
12+
cargo install $name --version $version
13+
fi
14+
}
15+
16+
cargo_install mdbook 0.1.1
17+
cargo_install mdbook-linkcheck 0.1.0
1018

1119
if command -v ghp-import >/dev/null 2>&1; then
1220
echo "ghp-import already installed at $(which ghp-import)"

0 commit comments

Comments
 (0)