Commit 78b9a619 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play telegram: rewrite version getting

parent 82222716
......@@ -6,28 +6,29 @@ SUPPORTEDARCHES="x86_64"
VERSION="$2"
DESCRIPTION="Telegram client from the official site"
URL="https://github.com/telegramdesktop/tdesktop"
TIPS="Run 'epm play telegram=beta' to install beta version of the Telegram client. Run 'epm play telegram version' to install the version of the Telegram client."
TIPS="Run 'epm play telegram=beta' to install beta version of the Telegram client."
. $(dirname $0)/common.sh
if [ "$VERSION" = "*" ] && ! is_glibc_enough 2.32 ; then
VERSION="4.9.5"
fi
if [ "$VERSION" = "*" ] ; then
[ "$PKGNAME" = "$BASEPKGNAME" ] || VERSION="*beta"
if ! is_glibc_enough 2.32 ; then
VERSION="4.9.5"
if [ "$PKGNAME" != "$BASEPKGNAME" ] ; then
prerelease="prelease"
fi
# can't use get_github_tag (not every tag has binary release)
PKGURL=$(get_github_url "https://github.com/telegramdesktop/tdesktop/" "tsetup.$VERSION.tar.xz" $prerelease)
if ! is_glibc_enough 2.28 ; then
fatal "glibc is too old, upgrade your system."
fi
PKGURL=$(eget --list --latest https://github.com/telegramdesktop/tdesktop/releases "tsetup.$VERSION.tar.xz") #"
else
PKGBASEURL="https://github.com/telegramdesktop/tdesktop/releases/download/v$VERSION"
[ "$PKGNAME" = "$BASEPKGNAME" ] || VERSION="$VERSION.beta"
# version can be 1.2.3.beta or 1.2.3
PKGURL="$PKGBASEURL/tsetup.$VERSION.tar.xz"
#if [ "$PKGNAME" = "$BASEPKGNAME" ] && ! epm tool eget --check-url "$PKGURL" ; then
# PKGURL="$PKGBASEURL/tsetup.$VERSION.beta.tar.xz"
#fi
fi
# override PKGNAME for beta version
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment