diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-02-07 21:27:45 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2020-02-07 21:27:45 +0300 |
commit | 816be88254a5473e053bde92c9b422fda66eec70 (patch) | |
tree | 3f9a67483308e74c2d683f6a068b7285b8b05fb5 /doc | |
parent | dad6110adb773e497b3fe39a112db17119695731 (diff) |
Add copyright variable substitution to doc/cli.sh
Diffstat (limited to 'doc')
-rwxr-xr-x | doc/cli.sh | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1,7 +1,6 @@ #! /usr/bin/env bash version=0.13.0-a.0.z -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' ../COPYRIGHT)" + while [ $# -gt 0 ]; do case $1 in --clean) @@ -42,6 +44,7 @@ function gen () # <name> cli -I .. \ -v version="$(echo "$version" | sed -e 's/^\([^.]*\.[^.]*\).*/\1/')" \ -v date="$date" \ +-v copyright="$copyright" \ --generate-html --html-suffix .xhtml \ --html-prologue-file doc-prologue.xhtml \ --html-epilogue-file doc-epilogue.xhtml \ |