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/get_latest_built_package_filename.sh | |
parent | df55195d132cbe6af516c6f1883315f26abd7f4a (diff) | |
download | tde-packaging-43429e67cfc03fdf5065e90c197753ec5f15aa19.tar.gz tde-packaging-43429e67cfc03fdf5065e90c197753ec5f15aa19.zip |
RPM Packaging: update build scripts
Diffstat (limited to 'redhat/build/get_latest_built_package_filename.sh')
-rwxr-xr-x | redhat/build/get_latest_built_package_filename.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/redhat/build/get_latest_built_package_filename.sh b/redhat/build/get_latest_built_package_filename.sh new file mode 100755 index 000000000..2d9f9ee39 --- /dev/null +++ b/redhat/build/get_latest_built_package_filename.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +PKGNAME="$1" +[ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1 + +RPMDIR=$(rpm -E %_rpmdir) + +RPM=$(find ${RPMDIR} -name "trinity-${PKGNAME}-[0-9]*.rpm" | sort -n | tail -n 1) + +if [ ! -r "${RPM}" ]; then + RPM=$(find ${RPMDIR} -name "${PKGNAME}-[0-9]*.rpm" | sort -n | tail -n 1) + if [ ! -r "${RPM}" ]; then + echo "Error, cannot find any package for '${PKGNAME}' !" + exit 1 + fi +fi + +echo $RPM |