#!/usr/bin/env bash # Copyright 2022 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Install dependencies to generate mdbook documentation. # Before running this script, `apt update` needs to be executed. set -ex # Install packages to run build.rs in some crate: # * libcap-dev: Used by minijail-sys/build.rs # * libudev-dev: Used by libudev-sys's build.rs, pulled by libva # * protobuf-compiler: Generates Rust files in protos sudo apt install --yes --no-install-recommends \ libcap-dev \ libudev-dev \ protobuf-compiler # The mdbook and mdbook-mermaid tools are used to build the crosvm book. cargo install mdbook --no-default-features --features search --version "^0.4.10" cargo install mdbook-mermaid --version "^0.8.3" cargo install mdbook-linkcheck --version "^0.7.6"