summaryrefslogtreecommitdiff
path: root/man/rst2man.sh
diff options
context:
space:
mode:
Diffstat (limited to 'man/rst2man.sh')
-rwxr-xr-xman/rst2man.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/man/rst2man.sh b/man/rst2man.sh
new file mode 100755
index 00000000..fc2b5ed8
--- /dev/null
+++ b/man/rst2man.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+input=$1
+output=$2
+
+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
+
+rst2man $out_dir/$in_file ${output%.gz}
+
+rm -f ${output}
+gzip ${output%.gz}