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.
19 lines
407 B
19 lines
407 B
11 years ago
|
#!/bin/bash
|
||
|
|
||
|
PKGNAME="$1"
|
||
|
TDE_VERSION="${2:-14.0.0}"
|
||
|
|
||
|
[ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1
|
||
|
|
||
|
RPM=$(get_latest_built_package_filename.sh "${PKGNAME}")
|
||
|
|
||
|
[ ! -r "${RPM}" ] && echo "No package found for '${PKGNAME}' !" && exit 2
|
||
|
|
||
|
VERSION=$(rpm -qp --qf "%{version}-%{release}" "${RPM}")
|
||
|
VERSION=${VERSION%.opt}
|
||
|
VERSION=${VERSION%.*}
|
||
|
VERSION=${VERSION/-*_/\~}
|
||
|
|
||
|
|
||
|
echo $VERSION
|