QMimeDatabase/xml: use xmlstarlet instead of xml

some distributions (eg Ubuntu) don't provide xml executable, but only xmlstarlet executable

Change-Id: Icc801ded8d4ec1ec4d1dab93289a2365f8cd9cbd
Pick-to: 5.15
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Eric Lemanissier 2020-05-26 16:51:08 +00:00
parent bdcb141464
commit 370324f6e2
1 changed files with 2 additions and 2 deletions

View File

@ -67,9 +67,9 @@ if ($fname eq "--zstd") {
# Check if xml (from xmlstarlet) is in $PATH
my $cmd;
if (checkCommand("xml")) {
if (checkCommand("xmlstarlet")) {
# Minify the data before compressing
$cmd = "xml sel -D -B -t -c / $fname";
$cmd = "xmlstarlet sel -D -B -t -c / $fname";
$cmd .= "| $compress" if $compress;
} elsif ($compress) {
$cmd = "$compress < $fname"