]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/html.in
Merge pull request #18007 from fw-strlen/ipv6_masq_and_dnat
[thirdparty/systemd.git] / man / html.in
1 #!/bin/sh
2 set -e
3
4 if [ -z "$1" ]; then
5 echo "Use: $0 page-name (with no section suffix)"
6 exit 1
7 fi
8
9 # make sure the rules have been regenerated (in case update-man-rules was just run)
10 ninja -C "@BUILD_ROOT@" version.h
11
12 target="man/$1.html"
13 ninja -C "@BUILD_ROOT@" "$target"
14
15 fullname="@BUILD_ROOT@/$target"
16 redirect="$(test -f "$fullname" && readlink "$fullname" || :)"
17 if [ -n "$redirect" ]; then
18 ninja -C "@BUILD_ROOT@" "man/$redirect"
19
20 fullname="@BUILD_ROOT@/man/$redirect"
21 fi
22
23 set -x
24 exec xdg-open "$fullname"