From: Luca Boccassi Date: Wed, 29 Mar 2023 00:17:50 +0000 (+0100) Subject: man: fix shellcheck warning for html.in X-Git-Tag: v254-rc1~884^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a5979f0bd50234ff9cad47f160d121628e0e3bbe;p=thirdparty%2Fsystemd.git 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. --- diff --git a/man/html.in b/man/html.in index 5e545b74128..aaff9d13838 100755 --- a/man/html.in +++ b/man/html.in @@ -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"