diff --git a/buildGuide.sh b/buildGuide.sh index 73bb90305e..cb916ade78 100755 --- a/buildGuide.sh +++ b/buildGuide.sh @@ -33,6 +33,9 @@ if [ ! -d target ]; then fi # Remove the html and build directories and then recreate the html/images/ directory +if [ -d target/html ]; then +- rm -r target/html/ +fi if [ -d target/html ]; then rm -r target/html/ fi @@ -45,9 +48,22 @@ echo "********************************************" echo " Building $CURRENT_GUIDE " echo "********************************************" echo "" -echo "Building an asciidoctor version of the $CURRENT_GUIDE" +echo "Building an asciidoctor version of the guide" asciidoctor -t -dbook -a toc -o target/html/$CURRENT_GUIDE.html target/master.adoc +echo "" +echo "Building a ccutil version of the guide" +ccutil compile --lang en_US --format html-single --main-file target/master.adoc + cd .. -echo "View the guide here: " file://$CURRENT_DIRECTORY/target/html/$CURRENT_GUIDE.html +echo "View the asciidoctor build here: " file://$CURRENT_DIRECTORY/target/html/$CURRENT_GUIDE.html + +if [ -d $CURRENT_DIRECTORY/build/tmp/en-US/html-single/ ]; then + echo "View the ccutil build here: " file://$CURRENT_DIRECTORY/build/tmp/en-US/html-single/index.html + exit 0 +else + echo -e "${RED}Build using ccutil failed!" + echo -e "${BLACK}See the log above for details." + exit 1 +fi