DESCRIPTION="Telegram client from the official site"
PRODUCTALT="stable beta"
PRODUCTALT="'' beta"
VERSION="$2"
TIPS="Run 'epm play telegram-desktop=beta' to install beta version of the Telegram client. Run 'epm play telegram-desktop version' to install the version of the Telegram client."
BRANCH="[0-9]"
if echo"$2" | grep-q"beta"|| epm installed Telegram-beta ;then
BRANCH=beta
PKGNAME=$PKGNAME-$BRANCH
fi
VERSION="*$BRANCH"
[-n"$2"]&&["$2"!="beta"]&&VERSION="$2"
.$(dirname$0)/common.sh
if["$VERSION"="*"];then
["$PKGNAME"="$BASEPKGNAME"]||VERSION="*beta"
fi
PKGURL=$(epm tool eget --list--latest https://github.com/telegramdesktop/tdesktop/releases "tsetup.$VERSION.tar.xz")#"
PKGURL=$(epm tool eget --list--latest https://github.com/telegramdesktop/tdesktop/releases "tsetup.$VERSION*.tar.xz")#"