1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-06 13:17:44 +03:00

man: fix shellcheck warning for html.in

SC2015: Note that A && B || C is not if-then-else. C may run when A is true.
(cherry picked from commit a5979f0bd5)
This commit is contained in:
Luca Boccassi 2023-03-29 01:17:50 +01:00 committed by Luca Boccassi
parent 4629419038
commit 18afac6e90

View File

@ -14,7 +14,11 @@ target="man/$1.html"
ninja -C "@BUILD_ROOT@" "$target"
fullname="@BUILD_ROOT@/$target"
redirect="$(test -f "$fullname" && readlink "$fullname" || :)"
if [ -f "$fullname" ]; then
redirect="$(readlink "$fullname" || :)"
else
redirect=""
fi
if [ -n "$redirect" ]; then
ninja -C "@BUILD_ROOT@" "man/$redirect"