summaryrefslogtreecommitdiffstats
path: root/man/html.in
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2023-03-29 02:17:50 +0200
committerLuca Boccassi <bluca@debian.org>2023-03-29 03:08:18 +0200
commita5979f0bd50234ff9cad47f160d121628e0e3bbe (patch)
tree746489982e90efbb20f747efca93d16605ddcb80 /man/html.in
parentman: correct/tweak text about unit name syntax (diff)
downloadsystemd-a5979f0bd50234ff9cad47f160d121628e0e3bbe.tar.xz
systemd-a5979f0bd50234ff9cad47f160d121628e0e3bbe.zip
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.
Diffstat (limited to 'man/html.in')
-rwxr-xr-xman/html.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/man/html.in b/man/html.in
index 5e545b7412..aaff9d1383 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"