We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a268d1 commit 9cbd9abCopy full SHA for 9cbd9ab
ci/install.sh
@@ -1,12 +1,20 @@
1
#!/bin/bash
2
set -ex
3
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
+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)"
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
18
19
if command -v ghp-import >/dev/null 2>&1; then
20
echo "ghp-import already installed at $(which ghp-import)"
0 commit comments