diff options
author | François Andriot <albator78@libertysurf.fr> | 2021-01-30 14:34:02 +0100 |
---|---|---|
committer | François Andriot <albator78@libertysurf.fr> | 2021-01-30 22:29:41 +0100 |
commit | 6581dc50b83f203d65eac61c00a159ab2a6ddb5d (patch) | |
tree | 85c02d38ca9dcedc28798ee41c4b16ec7260e9bc /redhat/build/is_latest_package_built.sh | |
parent | 87e57a1a070839a44db16a0410ef57902db2df3e (diff) | |
download | tde-packaging-6581dc50b83f203d65eac61c00a159ab2a6ddb5d.tar.gz tde-packaging-6581dc50b83f203d65eac61c00a159ab2a6ddb5d.zip |
RPM: massive update and cleanup
Diffstat (limited to 'redhat/build/is_latest_package_built.sh')
-rwxr-xr-x | redhat/build/is_latest_package_built.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/redhat/build/is_latest_package_built.sh b/redhat/build/is_latest_package_built.sh index 5ce0c83a9..2acb98a6a 100755 --- a/redhat/build/is_latest_package_built.sh +++ b/redhat/build/is_latest_package_built.sh @@ -1,21 +1,23 @@ #!/bin/bash PKGNAME="${1##*/}" -TDE_VERSION="${2:-${TDE_VERSION:-14.0.5}}" +TDE_VERSION="${2:-${TDE_VERSION:-14.0.7}}" -BUILT=$(get_latest_built_package_version.sh ${PKGNAME} ${TDE_VERSION}) -TARBALL=$(get_latest_tarball_version.sh ${PKGNAME} ${TDE_VERSION}) +BUILT="$(get_latest_built_package_version.sh ${PKGNAME} ${TDE_VERSION})" +TARBALL="$(get_latest_tarball_version.sh ${PKGNAME} ${TDE_VERSION})" RPM_PKGNAME="$(get_rpm_package_name.sh ${PKGNAME})" +[ -z "${TARBALL}" ] && exit 1 + # If package version contains a "~": it's a pre-release -if [ "${BUILT/\~/}" != "${BUILT}" ]; then - if [ "${BUILT#*\~}" = "${TARBALL#*\~}" ]; then +if [ "${BUILT/~/}" != "${BUILT}" ]; then + if [ "${BUILT#*_pre}" = "${TARBALL#*~pre}" ]; then echo "Latest development package '${PKGNAME}' version '${BUILT}' is already built." exit 0 fi # Nominal case: no "~" caracter else - if [ "${TARBALL%-*}" = "${BUILT%-*}" ] || [[ "${BUILT}" =~ [0-9\.]*-${TARBALL}_[0-9]* ]]; then + if [ "${TARBALL%-*}" = "${BUILT%-*}" ] || [[ "${BUILT}" =~ ${TARBALL}_[0-9]* ]]; then echo "Latest stable package '${PKGNAME}' version '${BUILT}' is already built." exit 0 fi |