diff options
author | Luca Boccassi <bluca@debian.org> | 2023-03-29 02:17:50 +0200 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2023-03-29 03:08:18 +0200 |
commit | a5979f0bd50234ff9cad47f160d121628e0e3bbe (patch) | |
tree | 746489982e90efbb20f747efca93d16605ddcb80 /man/html.in | |
parent | man: correct/tweak text about unit name syntax (diff) | |
download | systemd-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-x | man/html.in | 6 |
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" |