2015-04-10 09:47:11 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
SRC=$1
|
|
|
|
DEST=$2
|
|
|
|
URL=https://static.opensuse.org/appstream/tumbleweed
|
2015-11-23 07:30:03 +01:00
|
|
|
# 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
|
2015-04-10 09:47:11 +02:00
|
|
|
|
|
|
|
/usr/bin/appstream-builder \
|
|
|
|
--enable-hidpi \
|
|
|
|
--include-failed \
|
|
|
|
--temp-dir=/tmp/apb \
|
|
|
|
--cache-dir=/tmp/apb/cache \
|
|
|
|
--origin=appdata \
|
|
|
|
--api-version=0.8 \
|
|
|
|
--basename=appdata \
|
|
|
|
--packages-dir=${SRC} \
|
|
|
|
--output-dir=${DEST}
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
2015-11-23 07:30:03 +01:00
|
|
|
if [ "$HTMLOUT" = "yes" ]; then
|
|
|
|
/usr/bin/appstream-util \
|
|
|
|
status-html \
|
|
|
|
${DEST}/appdata.xml.gz \
|
|
|
|
${DEST}/appdata.html
|
2015-04-10 09:47:11 +02:00
|
|
|
|
2015-11-23 07:30:03 +01:00
|
|
|
# compress the HTML file (boo#942985)
|
|
|
|
xz -9 ${DEST}/appdata.html
|
2015-09-03 17:59:26 +02:00
|
|
|
|
2015-11-23 07:30:03 +01:00
|
|
|
/usr/bin/appstream-util \
|
|
|
|
status-html \
|
|
|
|
${DEST}/appdata-failed.xml.gz \
|
|
|
|
${DEST}/appdata-failed.html
|
2015-04-10 09:47:11 +02:00
|
|
|
|
2015-11-23 07:30:03 +01:00
|
|
|
# compress the HTML file (boo#942985)
|
|
|
|
xz -9 ${DEST}/appdata-failed.html
|
|
|
|
fi
|