appstream-glib/openSUSE-appstream-process
Bjørn Lie d99a4249f3 Accepting request 356714 from GNOME:Next
- openSUSE-appstream-process: use specific temporary/cache
  directories between calls. Otherwise, icons extracted from a
  previous run bleed into the next one.

OBS-URL: https://build.opensuse.org/request/show/356714
OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/appstream-glib?expand=0&rev=57
2016-01-29 16:09:05 +00:00

50 lines
1.2 KiB
Bash

#!/bin/bash
SRC=$1
DEST=$2
URL=https://static.opensuse.org/appstream/tumbleweed
# Do not produce the html files - the biggest tasks are done
# Users interested in them can always produce them locally out of the appdata.xml.gz file
HTMLOUT=no
TMDIR=$(mktemp -d)
/usr/bin/appstream-builder \
--enable-hidpi \
--include-failed \
--temp-dir=${TMPDIR}/apb \
--cache-dir=${TMPDIR}/apb/cache \
--origin=appdata \
--api-version=0.8 \
--basename=appdata \
--packages-dir=${SRC} \
--output-dir=${DEST}
# clean up TMPDIR again
rm -rf ${TMPDIR}
# Change screenshot URLs to our own infrastructure; disabled, as infra not ready
# appstream-util mirror-screenshots \
# ${DEST}/appdata.xml.gz \
# ${URL} \
# /usr/share/app-screenshots \
# /tmp/apb-screenshots
if [ "$HTMLOUT" = "yes" ]; then
/usr/bin/appstream-util \
status-html \
${DEST}/appdata.xml.gz \
${DEST}/appdata.html
# compress the HTML file (boo#942985)
xz -9 ${DEST}/appdata.html
/usr/bin/appstream-util \
status-html \
${DEST}/appdata-failed.xml.gz \
${DEST}/appdata-failed.html
# compress the HTML file (boo#942985)
xz -9 ${DEST}/appdata-failed.html
fi