File: docs.sh

package info (click to toggle)
rust-coreutils 0.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 505,620 kB
  • sloc: ansic: 103,594; asm: 28,570; sh: 8,910; python: 5,581; makefile: 472; cpp: 97; javascript: 72
file content (28 lines) | stat: -rwxr-xr-x 536 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#! /usr/bin/env bash

# Script to build rust docs.
#
# Usage:  ./ci/docs.sh [open]

set -e

arg1="$1"

# Install Rust nightly.
rustup install nightly

export RUSTDOCFLAGS='--cfg docsrs'
export DOCS_RS=1

if [ "$arg1" = "open" ]; then
    cargo +nightly doc --no-deps --open
else
    cargo +nightly doc --no-deps

    # Add an index.html file that redirects to our main page.
    if [ ! -f "target/doc/index.html" ]; then
        echo '<meta http-equiv=refresh content=0;url=exacl/index.html>' >"target/doc/index.html"
    fi
fi

exit 0