summaryrefslogtreecommitdiffstats
path: root/src/boost/tools/quickbook/test/regen-gold.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/boost/tools/quickbook/test/regen-gold.sh
parentInitial commit. (diff)
downloadceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz
ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/tools/quickbook/test/regen-gold.sh')
-rw-r--r--src/boost/tools/quickbook/test/regen-gold.sh47
1 files changed, 47 insertions, 0 deletions
diff --git a/src/boost/tools/quickbook/test/regen-gold.sh b/src/boost/tools/quickbook/test/regen-gold.sh
new file mode 100644
index 000000000..c1f9b8e8e
--- /dev/null
+++ b/src/boost/tools/quickbook/test/regen-gold.sh
@@ -0,0 +1,47 @@
+#==============================================================================
+# Copyright (c) 2017-2018 Daniel James
+#
+# Use, modification and distribution is subject to the Boost Software
+# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+#==============================================================================
+
+#!/usr/bin/env bash
+
+cd $(dirname $0)
+
+cd ..
+b2 -q || exit 1
+cd -
+
+find . -name "*.gold" | while read gold_file
+do
+ flags="--debug"
+
+ quickbook_file=$(echo $gold_file | sed 's/[.]gold/.quickbook/')
+ html_file=$(echo $gold_file | sed 's/[.]gold/.gold-html/')
+
+ if [[ $gold_file =~ .*xinclude/.*-alt\.gold ]]
+ then
+ quickbook_file=$(echo $quickbook_file | sed 's/-alt\.quickbook/.quickbook/')
+ flags="$flags --xinclude-base xinclude/sub"
+ elif [[ $gold_file =~ .*xinclude/.*\.gold ]]
+ then
+ flags="$flags --xinclude-base xinclude/../.."
+ fi
+
+ if [[ $gold_file =~ .*include/filename[-_]path.* ]]
+ then
+ flags="$flags -I include/sub"
+ fi
+
+ if [[ $gold_file =~ .*command_line_macro.* ]]
+ then
+ flags="$flags -D__macro__=*bold* -D__empty__"
+ fi
+
+ ../../../dist/bin/quickbook $quickbook_file $flags --output-file $gold_file ||
+ echo "*** Error generating boostbook from $quickbook_file"
+ ../../../dist/bin/quickbook $quickbook_file $flags --output-file $html_file --output-format onehtml ||
+ echo "*** Error generating html from $quickbook_file"
+done