mirror of
https://github.com/systemd/systemd.git
synced 2025-01-07 21:18:41 +03:00
cb713f1696
Most of them were reported by Fossies.org
20 lines
510 B
Bash
Executable File
20 lines
510 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
if [ -z "$1" ]; then
|
|
echo "Use: $0 page-name (with no section suffix)"
|
|
exit 1
|
|
fi
|
|
|
|
# make sure the rules have been regenerated (in case man/update-man-rules was just run)
|
|
ninja -C "@BUILD_ROOT@" version.h
|
|
|
|
page="$(echo "$1" | sed 's/\./\\./')"
|
|
target=$(ninja -C "@BUILD_ROOT@" -t query man/man | grep -E -m1 "man/$page\.[0-9]$" | awk '{print $2}')
|
|
if [ -z "$target" ]; then
|
|
echo "Cannot find page $1"
|
|
exit 1
|
|
fi
|
|
ninja -C "@BUILD_ROOT@" "$target"
|
|
exec man "@BUILD_ROOT@/$target"
|