From 3d69e11dbcb921775093255d6530ad8d29aa72d6 Mon Sep 17 00:00:00 2001 From: Sande Gilda Date: Wed, 30 Nov 2016 14:43:16 -0500 Subject: [PATCH] Add ccutil back into the script since it catches more errors --- buildGuide.sh | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) 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