Alberto Planas Dominguez
37d8180d36
New package - needed for using labels in openSUSE containers. OBS-URL: https://build.opensuse.org/request/show/663685 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-kiwi_label_helper?expand=0&rev=1
25 lines
460 B
Bash
25 lines
460 B
Bash
#!/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}"
|
|
|
|
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}"
|