[master 1/1] Add make-sphinx-docs helper script
bcl
installerbot-noreply at redhat.com
Mon Jul 13 22:35:45 UTC 2015
From: "Brian C. Lane" <bcl at redhat.com>
---
scripts/make-sphinx-docs | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
create mode 100755 scripts/make-sphinx-docs
diff --git a/scripts/make-sphinx-docs b/scripts/make-sphinx-docs
new file mode 100755
index 0000000..03a8a8d
--- /dev/null
+++ b/scripts/make-sphinx-docs
@@ -0,0 +1,40 @@
+#!/bin/bash
+#
+# Helper script for updating the Sphinx documentation. It requires a full install of the
+# dependencies so we do that in a mock chroot.
+#
+# Copyright (C) 2015 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Author: Brian C. Lane <bcl at redhat.com>
+#
+MOCKCFG=fedora-rawhide-x86_64
+
+if [ -z "$DISPLAY" ]; then
+ echo "Run script on a desktop system with a GUI"
+ exit 1
+fi
+# Pass it anything to skip re-initialzing the chroot
+[ -z "$1" ] && mock -r $MOCKCFG --init
+mock -r $MOCKCFG -i python-blivet -i python-sphinx -i python-sphinx_rtd_theme -i pygobject3 -i python-mock
+mock -r $MOCKCFG --copyin $PWD /builddir/blivet/
+# Note that DISPLAY is needed to make GTK happy, so this needs to be run from a system with a GUI
+mock -r $MOCKCFG --chroot "cd /builddir/blivet/doc/; DISPLAY=$DISPLAY make html"
+mock -r $MOCKCFG --copyout /builddir/blivet/doc/_build/html $PWD/doc/_build/html
+
+# blivet currently uses RTD for docs, skip the instructions for now.
+#echo "Now make sure the ./doc/html.new/ looks ok and copy it over the top of ./doc/html/ and commit."
+#echo "Then copy ./doc/html/ outside the repo and check out the gh-pages branch. Copy them back to /"
+#echo "and commit to update the https://rhinstaller.github.io/blivet/ page."
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/49b614c3c94ac5f52949778fd85504b795cf0966
More information about the anaconda-patches
mailing list