summaryrefslogtreecommitdiff
path: root/doc/cli.sh
diff options
context:
space:
mode:
Diffstat (limited to 'doc/cli.sh')
-rwxr-xr-xdoc/cli.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/cli.sh b/doc/cli.sh
new file mode 100755
index 0000000..44d311a
--- /dev/null
+++ b/doc/cli.sh
@@ -0,0 +1,24 @@
+#! /usr/bin/env bash
+
+trap 'exit 1' ERR
+set -o errtrace # Trap in functions.
+
+function info () { echo "$*" 1>&2; }
+function error () { info "$*"; exit 1; }
+
+while [ $# -gt 0 ]; do
+ case $1 in
+ --clean)
+ rm -f build2-bash-style.xhtml
+ exit 0
+ ;;
+ *)
+ error "unexpected $1"
+ ;;
+ esac
+done
+
+cli --generate-html --html-suffix .xhtml \
+--html-prologue-file doc-prologue.xhtml \
+--html-epilogue-file doc-epilogue.xhtml \
+--output-prefix build2- bash-style.cli