]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/html.in
journald: bring order of MaxLevelXYZ= setting explanations in sync with listed names
[thirdparty/systemd.git] / man / html.in
1 #!/bin/sh
2 # SPDX-License-Identifier: LGPL-2.1-or-later
3 set -e
4
5 if [ -z "$1" ]; then
6 echo "Use: $0 page-name (with no section suffix)"
7 exit 1
8 fi
9
10 # make sure the rules have been regenerated (in case update-man-rules was just run)
11 ninja -C "@BUILD_ROOT@" version.h
12
13 target="man/$1.html"
14 ninja -C "@BUILD_ROOT@" "$target"
15
16 fullname="@BUILD_ROOT@/$target"
17 if [ -f "$fullname" ]; then
18 redirect="$(readlink "$fullname" || :)"
19 else
20 redirect=""
21 fi
22 if [ -n "$redirect" ]; then
23 ninja -C "@BUILD_ROOT@" "man/$redirect"
24
25 fullname="@BUILD_ROOT@/man/$redirect"
26 fi
27
28 set -x
29 exec xdg-open "$fullname"