summaryrefslogtreecommitdiff
path: root/man/rst2man.sh
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2018-08-31 08:23:53 -0700
committerLucas De Marchi <lucas.demarchi@intel.com>2018-09-11 16:33:08 -0700
commitc7fa2ea9fbce87206474748100b825558eebe08e (patch)
treee976ea606a719a2d8c786156a4d0f7dae4ec44c3 /man/rst2man.sh
parent20a7ead8bdf09774c7d58fcbe6a0980d08ed5365 (diff)
build: allow to use rst2man from python3
While changing maintainer-tools to allow to use python3 I unsintalled my python2 tools, which broke IGT build for me. Allow to use either rst2man-3 or rst2man. v2: remove changes to autotools Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Acked-by: Jani Nikula <jani.nikula@linux.intel.com>
Diffstat (limited to 'man/rst2man.sh')
-rwxr-xr-xman/rst2man.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/man/rst2man.sh b/man/rst2man.sh
index 8106ca4b..49a98fc5 100755
--- a/man/rst2man.sh
+++ b/man/rst2man.sh
@@ -1,7 +1,8 @@
#!/bin/bash
-input=$1
-output=$2
+rst2man=$1
+input=$2
+output=$3
out_dir=$(dirname "${output}")
in_file=$(basename "${input}")
@@ -10,7 +11,7 @@ in_file=$(basename "${input}")
# generated we first need to move it all into the build 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}"