From b81ea7156d337010968192c0773f57bb947ef0d3 Mon Sep 17 00:00:00 2001 From: Michael Droogleever Date: Sun, 22 Jul 2018 02:04:39 +0200 Subject: [PATCH] Fix install script with full build --- ci/install.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/ci/install.sh b/ci/install.sh index 9df00ea..b9dee7a 100644 --- a/ci/install.sh +++ b/ci/install.sh @@ -1,12 +1,20 @@ set -euxo pipefail main() { - curl -LSfs https://japaric.github.io/trust/install.sh | \ - sh -s -- \ - --force \ - --git rust-lang-nursery/mdBook \ - --tag v0.1.8 \ - --target x86_64-unknown-linux-musl + + if [ "$(mdbook -V)" != "mdbook v0.1.8" ]; then + curl -LSfs https://japaric.github.io/trust/install.sh | \ + sh -s -- \ + --force \ + --git rust-lang-nursery/mdBook \ + --tag v0.1.8 \ + --target x86_64-unknown-linux-musl \ + || true + fi + + if [ "$(mdbook -V)" != "mdbook v0.1.8" ]; then + cargo install --target x86_64-unknown-linux-gnu --version 0.1.8 mdbook + fi rustup target add thumbv6m-none-eabi