2018-01-31 19:13:50 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -eux
|
|
|
|
|
|
|
|
cd $(dirname $0)
|
|
|
|
|
2018-02-06 20:10:58 +00:00
|
|
|
if [ -s NIGHTLY_TOOLCHAIN ]; then
|
|
|
|
rustup run $NIGHTLY_TOOLCHAIN cargo doc
|
|
|
|
else
|
|
|
|
cargo doc
|
|
|
|
fi;
|
2018-01-31 19:13:50 +00:00
|
|
|
|
|
|
|
# cargo-deadlinks will check any links in docs generated by `cargo doc`.
|
|
|
|
# This is useful as rustdoc uses raw links which are error prone.
|
|
|
|
command -v cargo-deadlinks &> /dev/null &&
|
|
|
|
cargo deadlinks
|
|
|
|
|
|
|
|
cd -
|