From a993c99d576cfef0798d2f69cb807bd8d08ced0a Mon Sep 17 00:00:00 2001 From: Jessica Tölke Date: Mon, 4 Jun 2012 21:08:22 +0200 Subject: Add a script to automatically format xml files. --- client/formatXML.sh | 13 +++++++++++++ client/indent.xsl | 7 +++++++ 2 files changed, 20 insertions(+) create mode 100755 client/formatXML.sh create mode 100644 client/indent.xsl diff --git a/client/formatXML.sh b/client/formatXML.sh new file mode 100755 index 0000000..c830f30 --- /dev/null +++ b/client/formatXML.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +cd .. + +for f in $(find -name "*.xml") +do + if [ ${f} != "./items.xml" ]; then + xsltproc tools/indent.xsl ${f} > ${f}__ + mv ${f}__ ${f} + fi +done +xmlindent items.xml > items.xml_ +sed 's/[[:space:]]*$//' items.xml_ > items.xml diff --git a/client/indent.xsl b/client/indent.xsl new file mode 100644 index 0000000..7d747ab --- /dev/null +++ b/client/indent.xsl @@ -0,0 +1,7 @@ + + + + + + + -- cgit v1.2.3-70-g09d2