From 279750251f0d6e864d3d80855b7fd3164387e3c6 Mon Sep 17 00:00:00 2001 From: Anton Bobov Date: Sun, 10 May 2020 22:10:27 +0500 Subject: Updates. --- xml-format | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 xml-format (limited to 'xml-format') 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 + -- cgit v1.2.3