diff options
author | François Andriot <albator78@libertysurf.fr> | 2014-01-24 20:46:50 +0100 |
---|---|---|
committer | François Andriot <albator78@libertysurf.fr> | 2014-01-24 20:46:50 +0100 |
commit | 43429e67cfc03fdf5065e90c197753ec5f15aa19 (patch) | |
tree | 3f85e6c48280c03682aa2aa92fca68fd9aa60634 /redhat/build/is_latest_package_installed.sh | |
parent | df55195d132cbe6af516c6f1883315f26abd7f4a (diff) | |
download | tde-packaging-43429e67cfc03fdf5065e90c197753ec5f15aa19.tar.gz tde-packaging-43429e67cfc03fdf5065e90c197753ec5f15aa19.zip |
RPM Packaging: update build scripts
Diffstat (limited to 'redhat/build/is_latest_package_installed.sh')
-rwxr-xr-x | redhat/build/is_latest_package_installed.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/redhat/build/is_latest_package_installed.sh b/redhat/build/is_latest_package_installed.sh new file mode 100755 index 000000000..6e1ed79d0 --- /dev/null +++ b/redhat/build/is_latest_package_installed.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +PKGNAME="${1##*/}" +TDE_VERSION="${2:-14.0.0}" + +INSTALLED=$(get_installed_package_version.sh ${PKGNAME}) +TARBALL=$(get_latest_tarball_version.sh ${PKGNAME} ${TDE_VERSION}) +SPEC=$(get_spec_version.sh ${PKGNAME} ${TDE_VERSION}) + +# Package containing "~" (e.g. R14 preversion tarballs): +if [ "${INSTALLED/\~/}" != "${INSTALLED}" ]; then + if [ "${INSTALLED#*\~}" = "${TARBALL#*\~}" ]; then + echo "Latest package '${PKGNAME}' version '${TARBALL}' is already built and installed." + exit 0 + fi +else + # Other package (e.g. akode) + if [ "${INSTALLED%-*}" = "${TARBALL%-*}" ]; then + echo "Latest package '${PKGNAME}' version '${INSTALLED}' is already built and installed." + exit 0 + fi + + # Other package (e.g. QT3) + if [ "${INSTALLED}" = "${SPEC}" ]; then + echo "Latest package '${PKGNAME}' version '${INSTALLED}' is already built and installed." + exit 0 + fi +fi + +exit 1 |