From e44edfb832e2491cd17edaa3dc8dc7b9e9265356 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 17 Oct 2016 17:19:59 +0200 Subject: Add bash style guide --- doc/cli.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 doc/cli.sh (limited to 'doc/cli.sh') 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 -- cgit v1.1