Trinity Desktop Environment Packaging
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.

18 lines
504B

  1. #!/bin/bash
  2. PKGNAME="$1"
  3. TDE_VERSION="${2:-${TDE_VERSION:-14.0.5}}"
  4. [ -z "${PKGNAME}" ] && echo "You must specify a package name !" && exit 1
  5. RPM=$(get_latest_built_package_filename.sh "${PKGNAME}" ${TDE_VERSION})
  6. [ ! -r "${RPM}" ] && echo "No package found for '${PKGNAME}' !" && exit 2
  7. VERSION=$(rpm -qp --qf "%{version}-%{release}" "${RPM}")
  8. VERSION=${VERSION%.opt} # Remove '.opt' suffix
  9. VERSION=${VERSION%.[a-z]*} # Remove distro suffix (e.g. '.el6')
  10. VERSION=${VERSION/-*_0_/\~}
  11. echo $VERSION