summaryrefslogtreecommitdiff
path: root/doc/cli.sh
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-10-17 17:19:59 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-10-17 17:19:59 +0200
commite44edfb832e2491cd17edaa3dc8dc7b9e9265356 (patch)
tree8a5b5e14cb0c3544dab5567ff62d84802c005c79 /doc/cli.sh
parenta1fdc495e0bf1e89c799460e64c8571b9710e5b3 (diff)
Add bash style guide
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