diff --git a/os_doc_tools/scripts/markdown-docbook.sh b/os_doc_tools/scripts/markdown-docbook.sh index 229e481..2805c8e 100755 --- a/os_doc_tools/scripts/markdown-docbook.sh +++ b/os_doc_tools/scripts/markdown-docbook.sh @@ -50,19 +50,25 @@ fi # ID and xml filename. FILENAME=$1 -FILEPATH=`find ./ -regextype posix-extended -regex ".*${FILENAME}\.(md|markdown|mdown)"` +FILEPATH=`find ./ -regextype posix-extended \ + -regex ".*${FILENAME}\.(md|markdown|mdown)"` DIRPATH=`dirname $FILEPATH` SOURCES=`ls $DIRPATH/*.md` # Check for requirements -type -P pandoc > /dev/null 2>&1 || { echo >&2 "pandoc not installed. Aborting."; exit 1; } -type -P xsltproc > /dev/null 2>&1 || { echo >&2 "xsltproc not installed. Aborting."; exit 1; } -type -P xmllint > /dev/null 2>&1 || { echo >&2 "xmllint not installed. Aborting."; exit 1; } +type -P pandoc > /dev/null 2>&1 || \ + { echo >&2 "pandoc not installed. Aborting."; exit 1; } +type -P xsltproc > /dev/null 2>&1 || \ + { echo >&2 "xsltproc not installed. Aborting."; exit 1; } +type -P xmllint > /dev/null 2>&1 || \ + { echo >&2 "xmllint not installed. Aborting."; exit 1; } TITLE=`head -n1 $DIRPATH/$FILENAME.md|sed -e 's/^#* *//'` -pandoc -V xmlid=$FILENAME --template=$DIR/pandoc-template.docbook -f markdown -t docbook -s ${SOURCES} |\ -xsltproc -o - ${DB_UPGRADE} - |\ -xmllint --format - |\ -sed -e "s|