man/html: fix invocation for pages which are *not* symlinks

It seems I tested that redirects work, but I forgot to check that non-redirects
are still fine too ;(
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2020-09-30 14:24:01 +02:00
parent 885a4e6ca7
commit 550f3ba68d
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ target="man/$1.html"
ninja -C "@BUILD_ROOT@" "$target"
fullname="@BUILD_ROOT@/$target"
redirect="$(readlink "$fullname" 2>/dev/null)"
redirect="$(test -f "$fullname" && readlink "$fullname" || :)"
if [ -n "$redirect" ]; then
ninja -C "@BUILD_ROOT@" "man/$redirect"