summaryrefslogtreecommitdiff
path: root/client/formatXML.sh
diff options
context:
space:
mode:
authorJessica Tölke <jtoelke@mail.upb.de>2012-06-04 21:08:22 +0200
committerJessica Tölke <jtoelke@mail.upb.de>2012-06-11 20:42:33 +0200
commita993c99d576cfef0798d2f69cb807bd8d08ced0a (patch)
tree076ed5da550b7c2b4ba79a06639eb7f5ed1e17ea /client/formatXML.sh
downloadtools-a993c99d576cfef0798d2f69cb807bd8d08ced0a.tar.gz
tools-a993c99d576cfef0798d2f69cb807bd8d08ced0a.tar.bz2
tools-a993c99d576cfef0798d2f69cb807bd8d08ced0a.tar.xz
tools-a993c99d576cfef0798d2f69cb807bd8d08ced0a.zip
Add a script to automatically format xml files.
Diffstat (limited to 'client/formatXML.sh')
-rwxr-xr-xclient/formatXML.sh13
1 files changed, 13 insertions, 0 deletions
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