The branch master has been updated via 2e8cfad0e7a3155e8cdeae1a2d9d0cfa9a4efe80 (commit) from e39973455eaed0265573f24ce0eb6e5544757169 (commit)
- Log ----------------------------------------------------------------- commit 2e8cfad0e7a3155e8cdeae1a2d9d0cfa9a4efe80 Author: Richard Levitte <levi...@openssl.org> Date: Fri Jun 4 11:31:45 2021 +0200 bin/mk-manpages3: install more than just HTML files OpenSSL 3.0 now sports images as well. Reviewed-by: Paul Dale <pa...@openssl.org> (Merged from https://github.com/openssl/web/pull/241) ----------------------------------------------------------------------- Summary of changes: bin/mk-manpages3 | 55 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/bin/mk-manpages3 b/bin/mk-manpages3 index 5c83583..dda2be5 100755 --- a/bin/mk-manpages3 +++ b/bin/mk-manpages3 @@ -5,30 +5,45 @@ checkoutdir=$1 series=$2 destdir=$3 -rm -rf tmp -mkdir tmp +rm -rf tmp-build +rm -rf tmp-install +mkdir tmp-build +mkdir tmp-install +install=$(cd tmp-install; pwd) -(cd tmp; $checkoutdir/Configure cc && make build_html_docs) +( + cd tmp-build + $checkoutdir/Configure --prefix=$install && make install_html_docs +) -srcdir=tmp/doc/html +srcdir=tmp-install/share/doc/openssl/html (cd $srcdir; find -type f) | while read F; do Dn=$(dirname $F) Fn=$(basename $F .html) - G=$Dn/$Fn.inc - $HERE/strip-man-html < $srcdir/$F > $destdir/$G - section=$(basename $Dn | sed -e 's|^man||') - description="$($HERE/all-html-man-names < $destdir/$G | sed -e 's|^.* - ||' -e 's|\&|\\\&|g')" - names="$($HERE/all-html-man-names < $destdir/$G | sed -e 's| - .*||' -e 's|, *| |g' -e 's|/|-|g')" - for name in $names; do - G=$Dn/$name.html - cat $HERE/../inc/manpage-template.html5 \ - | sed -E \ - -e "s|\\\$release\\\$|$series|g" \ - -e "s|\\\$sectnum\\\$|$section|g" \ - -e "s|\\\$description\\\$|$description|g" \ - -e "s|\\\$name\\\$|$name|g" \ - -e "s|\\\$origname\\\$|$Fn|g" \ - > $destdir/$G - done + if [ "$F" != "$Dn/$Fn" ]; then + # HTML file, which we treat specially + G=$Dn/$Fn.inc + $HERE/strip-man-html < $srcdir/$F > $destdir/$G + + section=$(basename $Dn | sed -e 's|^man||') + description="$($HERE/all-html-man-names < $destdir/$G | sed -e 's|^.* - ||' -e 's|\&|\\\&|g')" + names="$($HERE/all-html-man-names < $destdir/$G | sed -e 's| - .*||' -e 's|, *| |g' -e 's|/|-|g')" + for name in $names; do + G=$Dn/$name.html + cat $HERE/../inc/manpage-template.html5 \ + | sed -E \ + -e "s|\\\$release\\\$|$series|g" \ + -e "s|\\\$sectnum\\\$|$section|g" \ + -e "s|\\\$description\\\$|$description|g" \ + -e "s|\\\$name\\\$|$name|g" \ + -e "s|\\\$origname\\\$|$Fn|g" \ + > $destdir/$G + done + else + # Other file types, such as images. We simply copy those + G=$Dn/$Fn + mkdir -p $destdir/$Dn + cp $srcdir/$F $destdir/$G + fi done