diff options
Diffstat (limited to 'redhat/build/is_latest_package_built.sh')
-rwxr-xr-x | redhat/build/is_latest_package_built.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/redhat/build/is_latest_package_built.sh b/redhat/build/is_latest_package_built.sh new file mode 100755 index 000000000..4cec2702e --- /dev/null +++ b/redhat/build/is_latest_package_built.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +PKGNAME="${1##*/}" +TDE_VERSION="${2:-14.0.0}" + +BUILT=$(get_latest_built_package_version.sh ${PKGNAME} ${TDE_VERSION}) +TARBALL=$(get_latest_tarball_version.sh ${PKGNAME} ${TDE_VERSION}) + +if [ "${BUILT/\~/}" != "${BUILT}" ]; then + if [ "${BUILT#*\~}" = "${TARBALL#*\~}" ]; then + echo "Latest package '${PKGNAME}' version '${BUILT}' is already built." + exit 0 + fi +else + if [ "${TARBALL%-*}" = "${BUILT%-*}" ]; then + echo "Latest package '${PKGNAME}' version '${BUILT}' is already built." + exit 0 + fi +fi + +exit 1 |