]>
git.ipfire.org Git - thirdparty/systemd.git/blob - man/man.in
2 # SPDX-License-Identifier: LGPL-2.1-or-later
7 echo "Use: $0 page-name (with no section suffix)"
11 # make sure the rules have been regenerated (in case update-man-rules was just run)
12 ninja
-C "@BUILD_ROOT@" version.h
14 page
="$(echo "$1" | sed 's/\./\\./')"
15 target
=$
(ninja
-C "@BUILD_ROOT@" -t query man
/man |
grep -E -m1 "man/$page\.[0-9]$" |
awk '{print $2}')
16 if [ -z "$target" ]; then
17 echo "Cannot find page $1"
20 ninja
-C "@BUILD_ROOT@" "$target"
22 fullname
="@BUILD_ROOT@/$target"
23 redirect
="$(sed -n -r '1 s|^\.so man[0-9]/(.*)|\1|p' "$fullname")"
24 if [ -n "$redirect" ]; then
25 ninja
-C "@BUILD_ROOT@" "man/$redirect"
27 fullname
="@BUILD_ROOT@/man/$redirect"