summaryrefslogtreecommitdiff
path: root/tools/build/scripts/build-docs.sh
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-04-08 03:09:47 +0000
committer <>2015-05-05 14:37:32 +0000
commitf2541bb90af059680aa7036f315f052175999355 (patch)
treea5b214744b256f07e1dc2bd7273035a7808c659f /tools/build/scripts/build-docs.sh
parented232fdd34968697a68783b3195b1da4226915b5 (diff)
downloadboost-tarball-master.tar.gz
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_58_0.tar.bz2.HEADboost_1_58_0master
Diffstat (limited to 'tools/build/scripts/build-docs.sh')
-rwxr-xr-xtools/build/scripts/build-docs.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/tools/build/scripts/build-docs.sh b/tools/build/scripts/build-docs.sh
new file mode 100755
index 000000000..4463774ef
--- /dev/null
+++ b/tools/build/scripts/build-docs.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# Copyright 2014 Vladimir Prus
+# Distributed under 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)
+
+set -e
+
+# Build the documentation
+touch doc/jamroot.jam
+export BOOST_BUILD_PATH=`pwd`
+export BOOST_ROOT=/home/ghost/Sources/boost
+./bootstrap.sh
+cd doc
+../b2
+
+find . -type f -iname "*.html" | while read i; do
+ echo "Processing: $i"
+ sed -i "s#</body>#\
+ <script>\n\
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n\
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n\
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n\
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\
+\n\
+ ga('create', 'UA-2917240-2', 'auto');\n\
+ ga('send', 'pageview');\n\
+\n\
+ </script>\n\
+</body>#g" "$i"
+
+done
+