diff options
Diffstat (limited to 'xml-format')
| -rwxr-xr-x | xml-format | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/xml-format b/xml-format new file mode 100755 index 0000000..76a29bb --- /dev/null +++ b/xml-format @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +if [ -x "$(command -v xmlstarlet)" ] ; then + xmlstarlet format --omit-decl +elif [ -x "$(command -v xmllint)" ] ; then + xmllint --format - +else + exit 1 +fi + |
