diff options
Diffstat (limited to 'redhat/build/get_latest_tarball_version.sh')
-rwxr-xr-x | redhat/build/get_latest_tarball_version.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/redhat/build/get_latest_tarball_version.sh b/redhat/build/get_latest_tarball_version.sh new file mode 100755 index 000000000..b12d63cdd --- /dev/null +++ b/redhat/build/get_latest_tarball_version.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +PKGNAME="${1##*/}" +TDE_VERSION="${2:-14.0.0}" + +[ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1 + +TARBALL=$(get_latest_tarball_filename.sh "${PKGNAME}" ${TDE_VERSION}) + +[ ! -r "${TARBALL}" ] && echo "No tarball found for '${PKGNAME}' !" && exit 2 + +VERSION=${TARBALL##*/} +VERSION=${VERSION#trinity-} +VERSION=${VERSION#${PKGNAME}-} +VERSION=${VERSION#*-} +VERSION=${VERSION%.tar.gz} +VERSION=${VERSION%.tar.bz2} +echo "$VERSION" |