You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tde-packaging/redhat/build/get_latest_built_package_fi...

19 lines
434 B

#!/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