Add script to build docs.

This commit is contained in:
Sergio Benitez 2016-10-02 17:29:59 -07:00
parent 8ff92efc93
commit dc677124c6
1 changed files with 22 additions and 0 deletions

22
scripts/mk-docs.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
set -e
#
# Builds the rustdocs for all of the libraries.
#
# Brings in: EXAMPLES_DIR, LIB_DIR, CODEGEN_DIR, and CONTRIB_DIR, DOC_DIR
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $SCRIPT_DIR/config.sh
function mk_doc() {
local dir=$1
pushd $dir > /dev/null
echo ":: Documenting '${dir}'..."
cargo doc --no-deps --all-features
popd > /dev/null
}
mk_doc $LIB_DIR
mk_doc $CODEGEN_DIR
mk_doc $CONTRIB_DIR