aboutsummaryrefslogtreecommitdiff
path: root/doc/cli.sh
blob: c315efa8441120157d35b3561e46be0b710e6b6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! /usr/bin/env bash

version="0.2" # 0.2.0
date="January 2016"

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-toolchain-intro.xhtml build2-toolchain-intro.ps \
build2-toolchain-intro.pdf
      exit 0
      ;;
    *)
      error "unexpected $1"
      ;;
  esac
done

cli -I .. -v version="$version" -v date="$date" --generate-html \
--html-prologue-file intro-prologue.xhtml \
--html-epilogue-file intro-epilogue.xhtml \
--html-suffix .xhtml --output-prefix build2-toolchain- intro.cli

#html2ps -f intro.html2ps -o build2-toolchain-intro.ps build2-toolchain-intro.xhtml
#ps2pdf14 build2-toolchain-intro.ps build2-toolchain-intro.pdf