Converted the README file with rst format so that it can be easily converted
[barrelfish] / doc / 018-Practical-guide / generate_readme_tex.sh
1 #!/bin/bash
2 set -e
3 set -x
4 README="../../README"
5 CONVERTER="rst2latex"
6
7 # Create couple of temparaty files to store intermediate files
8 CLEANEDREADME=`mktemp --tmpdir="./" tmp.XXXXXX`
9 CONVERTEDTEX=`mktemp --tmpdir="./" tmp.XXXXXX`
10
11 # cleanup unwanted text from the readme file
12 ./cleanREADME.awk ${README} > ${CLEANEDREADME}
13
14 # Generate html from restructured text (assuming docutils are installed)
15 ${CONVERTER} ${CLEANEDREADME} ${CONVERTEDTEX}
16
17 # Remove all the unwanted sections still remaining in readme.tex file.
18 ./cleanTex.awk ${CONVERTEDTEX} > readme.tex
19
20 # remove the temp files created to store intermediate contents
21 rm -f ${CONVERTEDTEX} ${CLEANEDREADME}
22