2014-03-19 00:16:31 +04:00
|
|
|
#!/bin/bash
|
2014-07-12 00:28:55 +04:00
|
|
|
# Build documentation for display in web browser.
|
2014-03-19 00:16:31 +04:00
|
|
|
|
2014-04-03 05:38:20 +04:00
|
|
|
PORT=${1:-4000}
|
|
|
|
|
2014-11-14 10:31:34 +03:00
|
|
|
echo "usage: build_docs.sh [port]"
|
2014-04-03 05:38:20 +04:00
|
|
|
|
|
|
|
# Find the docs dir, no matter where the script is called
|
2014-07-12 00:28:55 +04:00
|
|
|
ROOT_DIR="$( cd "$(dirname "$0")"/.. ; pwd -P )"
|
|
|
|
cd $ROOT_DIR
|
2014-04-03 05:38:20 +04:00
|
|
|
|
2014-07-12 00:28:55 +04:00
|
|
|
# Gather docs.
|
|
|
|
scripts/gather_examples.sh
|
|
|
|
|
2014-09-04 00:22:09 +04:00
|
|
|
# Generate developer docs.
|
|
|
|
make docs
|
|
|
|
|
2014-07-12 00:28:55 +04:00
|
|
|
# Display docs using web server.
|
|
|
|
cd docs
|
2014-04-03 05:38:20 +04:00
|
|
|
jekyll serve -w -s . -d _site --port=$PORT
|