diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-02-11 22:31:38 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2020-02-13 14:43:20 +0300 |
commit | 7134f72530c7606c19fc02f9454eaf05e7d7b06a (patch) | |
tree | 79fe10107fdd0800dcec8bb28430d8c1039b01eb /doc/doc.sh | |
parent | 1377749f09a9bfde03f5a5c0aa1a0e0a9ca107d6 (diff) |
Add copyright variable substitution in doc/doc.sh
Diffstat (limited to 'doc/doc.sh')
-rwxr-xr-x | doc/doc.sh | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -1,7 +1,6 @@ #! /usr/bin/env bash version=2.5.0-b.6 -date="$(date +"%B %Y")" trap 'exit 1' ERR set -o errtrace # Trap in functions. @@ -9,6 +8,9 @@ set -o errtrace # Trap in functions. function info () { echo "$*" 1>&2; } function error () { info "$*"; exit 1; } +date="$(date +"%B %Y")" +copyright="$(sed -n -re 's%^Copyright \(c\) (.+)\.$%\1%p' ../LICENSE)" + while [ $# -gt 0 ]; do case $1 in --clean) @@ -36,14 +38,22 @@ function compile () # <input-name> <output-name> done # --html-suffix .xhtml - cli -I .. -v project="odb" -v version="$version" -v date="$date" \ + cli -I .. \ +-v project="odb" \ +-v version="$version" \ +-v date="$date" \ +-v copyright="$copyright" \ "${ops[@]}" --generate-html --stdout \ --html-prologue-file odb-prologue.xhtml \ --html-epilogue-file odb-epilogue.xhtml \ "../odb/$i.cli" >"$o.xhtml" # --man-suffix .1 - cli -I .. -v project="odb" -v version="$version" -v date="$date" \ + cli -I .. \ +-v project="odb" \ +-v version="$version" \ +-v date="$date" \ +-v copyright="$copyright" \ "${ops[@]}" --generate-man --stdout \ --man-prologue-file odb-prologue.1 \ --man-epilogue-file odb-epilogue.1 \ |