xtool.git
Publicgit clone https://git.maproj.org/xtool.gitxtool.git / Documentation / build.sh
build.sh26 lines · 473 BRaw
| 1 | #!/bin/bash |
| 2 | |
| 3 | set -euo pipefail |
| 4 | |
| 5 | cd "$(dirname "$0")" |
| 6 | |
| 7 | rm -rf docs |
| 8 | |
| 9 | if type -p xcrun &>/dev/null; then |
| 10 | docc="$(xcrun -f docc)" |
| 11 | else |
| 12 | docc="docc" |
| 13 | fi |
| 14 | |
| 15 | if [[ $# == 0 ]]; then |
| 16 | command="convert" |
| 17 | elif [[ $# == 1 && ( "$1" == "preview" || "$1" == "convert" ) ]]; then |
| 18 | command="$1" |
| 19 | else |
| 20 | echo "Usage: $0 [convert|preview]" |
| 21 | exit 1 |
| 22 | fi |
| 23 | |
| 24 | "$docc" "$command" xtool.docc \ |
| 25 | --enable-experimental-code-block-annotations \ |
| 26 | --experimental-enable-custom-templates |