summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-02-07 21:50:11 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-02-07 21:50:11 +0300
commitaf7ca4dff22b7e1a6355361294032b270a083ac2 (patch)
treeadde0616d59eaed905c5fc8c5b45a2006173af0a
parentbef4d63477cb1f6c8430893ea8ac1cf35bce2ba7 (diff)
Add copyright variable substitution to doc/cli.sh
-rw-r--r--COPYRIGHT1
-rwxr-xr-xdoc/cli.sh8
2 files changed, 7 insertions, 2 deletions
diff --git a/COPYRIGHT b/COPYRIGHT
new file mode 100644
index 0000000..6613d6c
--- /dev/null
+++ b/COPYRIGHT
@@ -0,0 +1 @@
+Copyright (c) 2014-2020 Code Synthesis Ltd.
diff --git a/doc/cli.sh b/doc/cli.sh
index e737ee7..458ff87 100755
--- a/doc/cli.sh
+++ b/doc/cli.sh
@@ -6,6 +6,8 @@ set -o errtrace # Trap in functions.
function info () { echo "$*" 1>&2; }
function error () { info "$*"; exit 1; }
+copyright="$(sed -n -re 's%^Copyright \(c\) (.+)\.$%\1%p' ../COPYRIGHT)"
+
while [ $# -gt 0 ]; do
case $1 in
--clean)
@@ -18,12 +20,14 @@ while [ $# -gt 0 ]; do
esac
done
-cli --generate-html --html-suffix .xhtml \
+cli -v copyright="$copyright" \
+--generate-html --html-suffix .xhtml \
--html-prologue-file doc-prologue.xhtml \
--html-epilogue-file doc-epilogue.xhtml \
--output-prefix build2- bash-style.cli
-cli --generate-html --html-suffix .xhtml \
+cli -v copyright="$copyright" \
+--generate-html --html-suffix .xhtml \
--html-prologue-file doc-prologue.xhtml \
--html-epilogue-file doc-epilogue.xhtml \
--output-prefix build2- release.cli