2019-01-09 10:39:22 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
if [ "${BUILD_DIST+x}" != "x" ]; then
|
|
|
|
echo "Not running in an OBS build container"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
BUILD_DATA="${BUILD_DIST/.dist/.data}"
|
|
|
|
. "${BUILD_DATA}"
|
|
|
|
|
2020-05-04 14:19:53 +00:00
|
|
|
# The build script renames the recipe (to strip _service:foo:), but doesn't update .data
|
|
|
|
RECIPEFILE="${RECIPEFILE##*:}"
|
|
|
|
|
2019-01-09 10:39:22 +00:00
|
|
|
if [ "${RECIPEFILE##*.}" != "kiwi" ]; then
|
|
|
|
echo "Recipe is not a kiwi file - exiting"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
tmp=$(mktemp)
|
|
|
|
if ! xsltproc /usr/lib/kiwi_label_helper/label_helper.xsl "${RECIPEFILE}" >> "${tmp}"; then
|
|
|
|
rm "${tmp}"
|
|
|
|
echo "xsltproc failed"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
mv -f "${tmp}" "${RECIPEFILE}"
|