mirror of
https://github.com/ostreedev/ostree.git
synced 2024-12-22 17:35:55 +03:00
9b6a8171c5
Make a copy of `man/html` to `docs/man` and then configure Jekyll to include it verbatim like the API docs. A link is added to the main index and the necessary commands are added to the github docs workflow.
38 lines
992 B
Bash
Executable File
38 lines
992 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Prepare docs directory for running jekyll. This would be better as a
|
|
# local Jekyll plugin, but those aren't allowed by the github-pages gem.
|
|
|
|
set -e
|
|
|
|
docsdir=$(dirname "$0")
|
|
topdir="$docsdir/.."
|
|
|
|
# Make sure the API docs have been generated and copy them to the
|
|
# reference directory.
|
|
apidocs="$topdir/apidoc/html"
|
|
refdir="$docsdir/reference"
|
|
if [ ! -d "$apidocs" ]; then
|
|
echo "error: API docs $apidocs have not been generated" >&2
|
|
echo "Rebuild with --enable-gtk-doc option" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "Copying $apidocs to $refdir"
|
|
rm -rf "$refdir"
|
|
cp -r "$apidocs" "$refdir"
|
|
|
|
# Make sure the manpages have been generated and copy them to the man
|
|
# directory.
|
|
manhtml="$topdir/man/html"
|
|
mandir="$docsdir/man"
|
|
if [ ! -d "$manhtml" ]; then
|
|
echo "error: HTML manpages $manhtml have not been generated" >&2
|
|
echo "Rebuild with --enable-man option and run `make manhtml`" >&2
|
|
exit 1
|
|
fi
|
|
|
|
echo "Copying $manhtml to $mandir"
|
|
rm -rf "$mandir"
|
|
cp -r "$manhtml" "$mandir"
|