Escapes double quotes for xml:id and double quotes sed input param.
Change-Id: Idbac2520e69838811b11fbfa0910cead74a93d77 Reviewed-on: https://review.openstack.org/15682 Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Approved: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Tested-by: Jenkins
This commit is contained in:
parent
e8c1f8b7a7
commit
f7d2a505d6
@ -14,8 +14,8 @@ shopt -s extglob
|
||||
# and images-api-v2.0.md and openstackapi-programming and images-api-v2.0 are the names
|
||||
# for the ID and xml filename.
|
||||
FILENAME=$1
|
||||
FILEPATH=`find ./ -regextype posix-extended -regex ".*${FILENAME}\.(md|markdown)"`
|
||||
FILEPATH=`find ./ -regextype posix-extended -regex ".*${FILENAME}\.(md|markdown|mdown)"`
|
||||
DIRPATH=`dirname $FILEPATH`
|
||||
pandoc -f markdown -t docbook -s ${FILEPATH} | xsltproc -o - /usr/share/xml/docbook/stylesheet/docbook5/db4-upgrade.xsl - | xmllint --format - | sed -e 's,<article,<book xml:id="$FILENAME",' | sed -e 's,</article>,</book>,' > ${DIRPATH}/$FILENAME.xml
|
||||
pandoc -f markdown -t docbook -s ${FILEPATH} | xsltproc -o - /usr/share/xml/docbook/stylesheet/docbook5/db4-upgrade.xsl - | xmllint --format - | sed -e "s,<article,<book xml:id=\"$FILENAME\"," | sed -e 's,</article>,</book>,' > ${DIRPATH}/$FILENAME.xml
|
||||
|
||||
pwd
|
||||
|
Loading…
Reference in New Issue
Block a user