Modern Apps git

xtool.git

Public
git clone https://git.maproj.org/xtool.git
appstore-distribution ▾

xtool.git / Documentation / build.sh

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