]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/html.in
Merge pull request #17049 from mrc0mmand/code-and-spell-check
[thirdparty/systemd.git] / man / html.in
CommitLineData
e9bbff18
ZJS
1#!/bin/sh
2set -e
3
4if [ -z "$1" ]; then
5 echo "Use: $0 page-name (with no section suffix)"
6 exit 1
7fi
8
cb713f16 9# make sure the rules have been regenerated (in case man/update-man-rules was just run)
3919ecc5
ZJS
10ninja -C "@BUILD_ROOT@" version.h
11
e9bbff18
ZJS
12target="man/$1.html"
13ninja -C "@BUILD_ROOT@" "$target"
4338ab81
ZJS
14
15fullname="@BUILD_ROOT@/$target"
16redirect="$(readlink "$fullname" 2>/dev/null)"
17if [ -n "$redirect" ]; then
18 ninja -C "@BUILD_ROOT@" "man/$redirect"
19
20 fullname="@BUILD_ROOT@/man/$redirect"
21fi
22
e9bbff18 23set -x
4338ab81 24exec xdg-open "$fullname"