diff mbox

[i-g-t,2/4] meson: Add quotes in man/rst2man.sh

Message ID 20180116111306.7080-2-petri.latvala@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Petri Latvala Jan. 16, 2018, 11:13 a.m. UTC
If the directories contain spaces, rst2man.sh fails.

Signed-off-by: Petri Latvala <petri.latvala@intel.com>
---
 man/rst2man.sh | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/man/rst2man.sh b/man/rst2man.sh
index fc2b5ed8..8106ca4b 100755
--- a/man/rst2man.sh
+++ b/man/rst2man.sh
@@ -3,14 +3,14 @@ 
 input=$1
 output=$2
 
-out_dir=$(dirname ${output})
-in_file=$(basename ${input})
+out_dir=$(dirname "${output}")
+in_file=$(basename "${input}")
 
 # rst2man doesn't handle multiple source directories well, and since defs.rst is
 # generated we first need to move it all into the build dir
-cp $input $out_dir
+cp "$input" "$out_dir"
 
-rst2man $out_dir/$in_file ${output%.gz}
+rst2man "$out_dir/$in_file" "${output%.gz}"
 
-rm -f ${output}
-gzip ${output%.gz}
+rm -f "${output}"
+gzip "${output%.gz}"