projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75f7e5e
)
man: fix shellcheck warning for html.in
author
Luca Boccassi
<bluca@debian.org>
Wed, 29 Mar 2023 00:17:50 +0000
(
01:17
+0100)
committer
Luca Boccassi
<bluca@debian.org>
Wed, 29 Mar 2023 01:08:18 +0000
(
02:08
+0100)
SC2015: Note that A && B || C is not if-then-else. C may run when A is true.
man/html.in
patch
|
blob
|
history
diff --git
a/man/html.in
b/man/html.in
index 5e545b741282a3d40c5676050b312f85afdbac8c..aaff9d138382f4c38ac1d367e3e2d892ba24aed4 100755
(executable)
--- 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"