]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/man.in
travis: add more ASan options
[thirdparty/systemd.git] / man / man.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 page="$(echo "$1" | sed 's/\./\\./')"
10 target=$(ninja -C "@BUILD_ROOT@" -t query man/man | grep -E -m1 "man/$page\.[0-9]$" | awk '{print $2}')
11 if [ -z "$target" ]; then
12 echo "Cannot find page $1"
13 exit 1
14 fi
15 ninja -C "@BUILD_ROOT@" "$target"
16 exec man "@BUILD_ROOT@/$target"