QMimeDatabase/xml: support both 'xmlstarlet' and 'xml' for minifying XML
Commit 370324f6e2 changed the call to 'xml' to 'xmlstarlet' because
some Linux distributions do not provide a binary called xml. Anyhow,
the official Windows packages of xmlstarlet only provide 'xml.exe'.
Therefore just check for both.
Pick-to: 5.15 6.0
Change-Id: I4381b256850e4101b760df21f2b0baffb4414620
Reviewed-by: Eric Lemanissier <eric.lemanissier@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
parent
9165866b19
commit
87ffd79622
|
|
@ -71,6 +71,10 @@ if (checkCommand("xmlstarlet")) {
|
|||
# Minify the data before compressing
|
||||
$cmd = "xmlstarlet sel -D -B -t -c / $fname";
|
||||
$cmd .= "| $compress" if $compress;
|
||||
} elsif (checkCommand("xml")) {
|
||||
# Minify the data before compressing
|
||||
$cmd = "xml sel -D -B -t -c / $fname";
|
||||
$cmd .= "| $compress" if $compress;
|
||||
} elsif ($compress) {
|
||||
$cmd = "$compress < $fname"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue