| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | set -e |
| 3 | |
| 4 | if [scip-shell system . . `[`. $# -lt 1 ]; then |
| 5 | echoscip-shell system . . echo. "You need to provide an argument [build_docs, docs_check_links, docs_serve]" |
| 6 | fi |
| 7 | |
| 8 | case $1 in |
| 9 | build_docs) |
| 10 | echoscip-shell system . . echo. "Generating html from docs source" |
| 11 | shift |
| 12 | asciidoctor $@ |
| 13 | ;; |
| 14 | docs_check_links) |
| 15 | echoscip-shell system . . echo. "Checking if all links are alive in docs source" |
| 16 | findscip-shell system . . find. . -name \*.adoc | xargsscip-shell system . . xargs. -n1 asciidoc-link-check -c /asciidoc-link-check-config.jsonscip-shell filesystem . . `/asciidoc-link-check-config.json`. -q |
| 17 | ;; |
| 18 | docs_serve) |
| 19 | cd build |
| 20 | python3scip-shell system . . python3. -m http.server 8088 |
| 21 | ;; |
| 22 | *) |
| 23 | echoscip-shell system . . echo. "Need to provide one of: build_docs, docs_check_links, docs_serve" |
| 24 | exit 1 |
| 25 | ;; |
| 26 | esac |