aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-02-11 22:31:38 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-02-13 14:43:20 +0300
commit7134f72530c7606c19fc02f9454eaf05e7d7b06a (patch)
tree79fe10107fdd0800dcec8bb28430d8c1039b01eb
parent1377749f09a9bfde03f5a5c0aa1a0e0a9ca107d6 (diff)
Add copyright variable substitution in doc/doc.sh
-rwxr-xr-xdoc/doc.sh16
-rw-r--r--doc/odb-epilogue.12
-rw-r--r--doc/odb-epilogue.xhtml2
-rw-r--r--doc/odb-prologue.xhtml2
4 files changed, 16 insertions, 6 deletions
diff --git a/doc/doc.sh b/doc/doc.sh
index a5517af..4e96aed 100755
--- a/doc/doc.sh
+++ b/doc/doc.sh
@@ -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 \
diff --git a/doc/odb-epilogue.1 b/doc/odb-epilogue.1
index aa80feb..e331b23 100644
--- a/doc/odb-epilogue.1
+++ b/doc/odb-epilogue.1
@@ -144,7 +144,7 @@ Send bug reports to the odb-users@codesynthesis.com mailing list.
.\" COPYRIGHT
.\"
.SH COPYRIGHT
-Copyright (c) 2009-2019 Code Synthesis Tools CC.
+Copyright (c) $copyright$.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
diff --git a/doc/odb-epilogue.xhtml b/doc/odb-epilogue.xhtml
index fda5ec6..9eba558 100644
--- a/doc/odb-epilogue.xhtml
+++ b/doc/odb-epilogue.xhtml
@@ -111,7 +111,7 @@
</div>
<div id="footer">
- &#169; 2009-2019 <a href="http://www.codesynthesis.com">Code Synthesis Tools CC</a>
+ Copyright &#169; $copyright$.
<div id="terms">
Permission is granted to copy, distribute and/or modify this
diff --git a/doc/odb-prologue.xhtml b/doc/odb-prologue.xhtml
index 95aa706..b8cc694 100644
--- a/doc/odb-prologue.xhtml
+++ b/doc/odb-prologue.xhtml
@@ -4,7 +4,7 @@
<head>
<title>ODB 2.4.0 Compiler Command Line Manual</title>
- <meta name="copyright" content="&#169; 2009-2019 Code Synthesis Tools CC"/>
+ <meta name="copyright" content="&#169; $copyright$"/>
<meta name="keywords" content="odb,object,relational,mapping,compiler,c++"/>
<meta name="description" content="ODB Compiler Command Line Manual"/>