forked from pool/obs-service-kiwi_metainfo_helper
Alberto Planas Dominguez
efc2a688f4
New package - needed for using labels in openSUSE containers. OBS-URL: https://build.opensuse.org/request/show/663684 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-kiwi_metainfo_helper?expand=0&rev=1
20 lines
446 B
Bash
20 lines
446 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
|
|
|
|
sed -i"" "s#%DISTURL%#${DISTURL}#g" "${RECIPEFILE}"
|
|
sed -i"" "s/%RELEASE%/${RELEASE}/g" "${RECIPEFILE}"
|
|
sed -i"" "s/%BUILDTIME%/$(date --utc +%FT%T.%NZ)/g" "${RECIPEFILE}"
|