9de06d0445
- Generate meta info for containers during rpm build OBS-URL: https://build.opensuse.org/request/show/903140 OBS-URL: https://build.opensuse.org/package/show/Virtualization/kubevirt?expand=0&rev=61
19 lines
506 B
Bash
19 lines
506 B
Bash
#!/bin/bash
|
|
|
|
TAGPREFIX=_TAGPREFIX_
|
|
LABELPREFIX=_LABELPREFIX_
|
|
REGISTRY=_REGISTRY_
|
|
PKG_VERSION=_PKG_VERSION_
|
|
PKG_RELEASE=_PKG_RELEASE_
|
|
|
|
if [ -n "${pkg}" ]; then
|
|
if rpm -q ${pkg}; then
|
|
PKG_VERSION=$(rpm -q --queryformat=%{version} ${pkg})
|
|
PKG_RELEASE=$(rpm -q --queryformat=%{release} ${pkg})
|
|
else
|
|
_pkg=$(find ./repos -name "${pkg}*.rpm")
|
|
PKG_VERSION=$(rpm -qp --queryformat=%{version} ${_pkg})
|
|
PKG_RELEASE=$(rpm -qp --queryformat=%{release} ${_pkg})
|
|
fi
|
|
fi
|