1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
From: Carlos Henrique Lima Melara <charlesmelara@riseup.net>
Subject: doc/gen-man.sh: use printf instead of echo to make it portable
printf is recommended instead of echo because it has a more predictable
behavior than echo (tip from the POSIX standard ;-). Using it allow us
to generate the _same_ manpage using sh, dash or bash.
Origin: upstream, https://github.com/MasterQ32/kristall/commit/4308819b9df8101bebc4c971f2de29c4cfc376df
Bug: https://github.com/MasterQ32/kristall/issues/274
Last-Update: 2023-06-11
---
doc/gen-man.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/gen-man.sh b/doc/gen-man.sh
index 4463c5a..c413002 100755
--- a/doc/gen-man.sh
+++ b/doc/gen-man.sh
@@ -64,7 +64,7 @@ gem_in=$(
)
# Convert gemtext to man format
-echo "$gem_in" | "$gemtext_converter" >> "$man_output"
+printf "%s" "$gem_in" | "$gemtext_converter" >> "$man_output"
# Write the tail to the output file.
cat "$man_tail" >> "$man_output"
|