meso-web

Sources of the |Méso|Star> website
git clone git://git.meso-star.com/meso-web.git
Log | Files | Refs | README | LICENSE

commit 65bbeb2f56457fa031ba4e926b10779fb5246836
parent f8551d41c25de35bc6d71a7d6b3614b9203915b2
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date:   Thu, 30 Jul 2026 16:51:56 +0200

Change solstice hook to generate man

Use stardis stuff

Diffstat:
Msolstice/hooks/01-generate-man.sh | 21++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/solstice/hooks/01-generate-man.sh b/solstice/hooks/01-generate-man.sh @@ -17,28 +17,39 @@ # You should have received a copy of the GNU General Public License # along with Méso-Web. If not, see <http://www.gnu.org/licenses/>. -set -e - +. "sty.sh" . "./config.sh.in" +set -e + ######################################################################## # Helper function ######################################################################## man_pages() { - find "${directory}/share/man" -name "*.[1-9]" + find "${solstice_dir}/share/man" -type f -name "*.[1-9]" } # Man to convert is submitted on stdin man2html() # output_filename { + # Define the relative path to the root of the website + worktree="$(absdir "../")" + output="$(absdir "$1")" + root="$(relpath_to_dir "${output}" "${worktree}")" + { cd .. sty-genhead "${OLDPWD##*/}/$1" - sh ./scripts/convert_man.sh + mandoc -O man=../man%S/%N.%S.html,fragment -I os=UNIX -T html cat ./templates/footer.html cd "${OLDPWD}" - } > "$1" + } \ + | sed \ + -e 's/<a class="Xr"[^>]\{0,\}>csplit(1)<\/a>/<a class "Xr">csplit(1)<\/a>/g' \ + -e 's/<a class="Xr"[^>]\{0,\}>feh(1)<\/a>/<a class "Xr">feh(1)<\/a>/g' \ + -e 's/<a class="Xr"[^>]\{0,\}>sed(1)<\/a>/<a class "Xr">sed(1)<\/a>/g' \ + > "$1" } ########################################################################