diff options
author | François Andriot <albator78@libertysurf.fr> | 2018-11-27 21:34:48 +0100 |
---|---|---|
committer | François Andriot <albator78@libertysurf.fr> | 2018-11-27 21:34:48 +0100 |
commit | a615d19df88eb2e989316b480519161945dbc7dc (patch) | |
tree | 369970b98042998b86c11024598155e037b76fec /redhat/build/is_latest_package_installed.sh | |
parent | 76a93e0011ade1583a1ec672f33411dfd35454f3 (diff) | |
download | tde-packaging-a615d19df88eb2e989316b480519161945dbc7dc.tar.gz tde-packaging-a615d19df88eb2e989316b480519161945dbc7dc.zip |
RPM: merge redhat directory with master branch
Diffstat (limited to 'redhat/build/is_latest_package_installed.sh')
-rwxr-xr-x | redhat/build/is_latest_package_installed.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/redhat/build/is_latest_package_installed.sh b/redhat/build/is_latest_package_installed.sh index 685fa7a05..7923eca50 100755 --- a/redhat/build/is_latest_package_installed.sh +++ b/redhat/build/is_latest_package_installed.sh @@ -8,8 +8,9 @@ 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 +if [ "${TARBALL/\~/}" != "${TARBALL}" ]; then + # Only compare the part after '~' + if [ "${INSTALLED##*_}" = "${TARBALL#*\~}" ] ||[ "${INSTALLED#*\~}" = "${TARBALL#*\~}" ]; then echo "Latest package '${PKGNAME}' version '${TARBALL}' is already built and installed." exit 0 fi @@ -21,7 +22,7 @@ else fi # Other package (e.g. QT3) - if [ "${INSTALLED}" = "${SPEC}" ]; then + if [ "${INSTALLED}" = "${SPEC}" ] || [ "${INSTALLED}$(rpm -E %dist)" = "${SPEC}" ]; then echo "Latest package '${PKGNAME}' version '${INSTALLED}' is already built and installed." exit 0 fi |